-
Notifications
You must be signed in to change notification settings - Fork 337
139 lines (137 loc) Β· 4.48 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: CI
on:
push:
branches:
- main
pull_request:
concurrency:
# Taken from gradle/gradle
# On main, we don't want any jobs cancelled so the sha is used to name the group
# On PR branches, we cancel the job if new commits are pushed
group: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags') ) && format('contributor-pr-base-{0}', github.sha) || format('contributor-pr-{0}', github.ref) }}
cancel-in-progress: true
jobs:
unit:
name: ${{ matrix.os }} jdk-${{ matrix.java }} unit tests ${{ matrix.shard }} / 2
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macOS-latest, ubuntu-latest]
java: ["17"]
shard: [1, 2]
include:
- os: ubuntu-latest
java: "8"
shard: 1
- os: ubuntu-latest
java: "8"
shard: 2
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'sbt'
- name: Run unit tests
run: |
bin/test.sh unit/test
env:
JAVA_VERSION: ${{ matrix.java }}
TEST_SHARD: ${{ matrix.shard }}
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
GOOGLE_APPLICATION_CREDENTIALS_JSON: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_JSON }}
shell: bash
integration:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
type:
[
gradle-mac,
sbt,
maven,
gradle,
scalacli,
mill,
feature,
cross,
scalafmt,
scalafix,
]
include:
- type: gradle-mac
command: bin/test.sh 'slow/testOnly -- tests.gradle.*'
name: Gradle MacOS integration
os: macOS-latest
- type: sbt
command: bin/test.sh 'slow/testOnly -- tests.sbt.*'
name: Sbt integration
os: ubuntu-latest
- type: sbt-metals jdk8
command: bin/test.sh sbt-metals/scripted
name: Sbt-metals/scripted jdk8
os: ubuntu-latest
java: "8"
- type: maven
command: bin/test.sh 'slow/testOnly -- tests.maven.*'
name: Maven integration
os: ubuntu-latest
- type: gradle
command: bin/test.sh 'slow/testOnly -- tests.gradle.*'
name: Gradle integration
os: ubuntu-latest
- type: mill
command: bin/test.sh 'slow/testOnly -- tests.mill.*'
name: Mill integration
os: ubuntu-latest
- type: scalacli
command: bin/test.sh 'slow/testOnly -- tests.scalacli.*'
name: Scala CLI integration
os: ubuntu-latest
- type: feature
command: bin/test.sh 'slow/testOnly -- tests.feature.*'
name: LSP integration tests
os: ubuntu-latest
- type: cross
command: sbt +cross/test
name: Scala cross tests
os: ubuntu-latest
- type: mtags-java
command: sbt javapc/test
name: Scala javapc tests
os: ubuntu-latest
- type: cross-test-nightly
command: sbt cross-test-latest-nightly
name: Scala3 latest NIGHTLY cross test
os: ubuntu-latest
- type: scalafix
command: sbt scalafixCheck docs/docusaurusCreateSite
name: Scalafix and docs
os: ubuntu-latest
- type: scalafmt
command: ./bin/scalafmt --test
name: Formatting
os: ubuntu-latest
- type: MiMa
command: sbt interfaces/mimaReportBinaryIssues
name: MiMa
os: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: "17"
cache: 'sbt'
- name: ${{ matrix.command }}
run: ${{ matrix.command }}
env:
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
GOOGLE_APPLICATION_CREDENTIALS_JSON: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS_JSON }}
- name: "test download dependencies"
run: sbt downloadDependencies
if: matrix.type == 'cross'