-
Notifications
You must be signed in to change notification settings - Fork 88
66 lines (55 loc) · 2.12 KB
/
ci.yml
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
57
58
59
60
61
62
63
64
65
66
name : CI
on :
push :
branches :
- main
tags-ignore :
- '**'
pull_request :
jobs :
test-ubuntu :
runs-on : ubuntu-latest
timeout-minutes : 25
strategy :
fail-fast : false
matrix :
kotlin-version : [ 1.8.22, 1.9.0 ]
steps :
- uses : actions/checkout@v3
- uses : actions/setup-java@v3
with :
distribution : 'temurin'
java-version : '11'
check-latest : true
- name : Test on Ubuntu
run : ./gradlew -p compiler assemble test --tests 'com.squareup.anvil.compiler.codegen.ContributesMultibindingGeneratorTest.a contributed multibinding can be generated*' --no-build-cache --no-daemon --stacktrace -Doverride_kotlin=${{ matrix.kotlin-version }}
- name : Upload Test Results
uses : actions/upload-artifact@v3
if : ${{ failure() }}
with :
name : test-results-${{ matrix.kotlin-version }}
path : ./**/build/reports/tests/
test-windows :
runs-on : windows-latest
timeout-minutes : 25
steps :
- uses : actions/checkout@v3
- uses : actions/setup-java@v3
with :
distribution : 'temurin'
java-version : '11'
check-latest : true
# On Windows the command looks a little bit different. Notice that we use the .bat file and
# quotes for the Kotlin version, because dots "." in the Kotlin version and parameter name
# cause issues.
#
# Expressions in Github actions are limited. If there would be an if expression, then we
# wouldn't need to duplicate the next step and depending on the OS enable / disable them.
- name : Test on Windows
run : ./gradlew.bat -p compiler assemble test --tests 'com.squareup.anvil.compiler.codegen.ContributesMultibindingGeneratorTest.a contributed multibinding can be generated*' --no-build-cache --no-daemon --stacktrace -Doverride_config-fullTestRun=false
- name : Upload Test Results
uses : actions/upload-artifact@v3
if : ${{ failure() }}
with :
name : test-results-windows
path : ./**/build/reports/tests/