-
Notifications
You must be signed in to change notification settings - Fork 45
56 lines (54 loc) · 1.45 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Unit Tests
# Trigger
on:
push:
branches:
- main
paths:
- .github/workflows/**
- build.gradle
- gradle.properties
- resources/**
- src/**
- vars/**
pull_request:
types: [opened, synchronize]
paths:
- .github/workflows/**
- build.gradle
- gradle.properties
- resources/**
- src/**
- vars/**
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
java: [ '11', '17' ]
groovy:
- ${{ vars.GROOVY_2_4 }}
- ${{ vars.GROOVY_2_5 }}
- ${{ vars.GROOVY_3_0 }}
- ${{ vars.GROOVY_4_0 }}
exclude:
- groovy: ${{ vars.GROOVY_2_4 }}
java: '17'
- groovy: ${{ vars.GROOVY_2_5 }}
java: '17'
name: Java ${{ matrix.java }} Groovy ${{ matrix.groovy }}
steps:
- uses: actions/checkout@v3
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- if: ${{ !(matrix.groovy == vars.GROOVY_4_0 && matrix.java == '17') }}
name: Unit Tests
run: GROOVY_VERSION=${{ matrix.groovy }} ./gradlew check
- if: ${{ matrix.groovy == vars.GROOVY_4_0 && matrix.java == '17' }}
name: Coveralls Test Coverage
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: GROOVY_VERSION=${{ matrix.groovy }} ./gradlew coveralls