Skip to content

Commit 0c29a95

Browse files
authored
Merge pull request #12 from harry0000/chore/update-ci
Update CI
2 parents 10d04c6 + f400e52 commit 0c29a95

File tree

2 files changed

+36
-25
lines changed

2 files changed

+36
-25
lines changed

.github/workflows/ci.yaml

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,53 @@
11
name: CI
2+
23
on:
34
pull_request:
5+
branches:
6+
- '**'
47
push:
8+
branches:
9+
- main
10+
11+
concurrency:
12+
group: "${{ github.workflow }}-${{ github.ref }}"
13+
cancel-in-progress: true
14+
515
jobs:
16+
lint:
17+
runs-on: ubuntu-latest
18+
env:
19+
# define Java options for both official sbt and sbt-extras
20+
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
21+
JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: actions/setup-java@v4
25+
with:
26+
distribution: temurin
27+
java-version: 21
28+
cache: sbt
29+
- name: 'Run Scalafmt'
30+
run: sbt -v ++3.4.2 scalafmtSbt scalafmtAll
631
test:
732
strategy:
833
fail-fast: false
934
matrix:
10-
name: [ "test" ]
11-
scala: [ 3.3.0, 3.4.1 ]
35+
scala: [ 3.3.0, 3.4.2 ]
1236
java: [ 20, 21 ]
13-
include:
14-
- name: "format"
15-
scala: 3.4.1
16-
java: 21
1737
exclude:
18-
- name: "test"
19-
scala: 3.3.0
38+
- scala: 3.3.0
2039
java: 21
2140
runs-on: ubuntu-latest
41+
env:
42+
# define Java options for both official sbt and sbt-extras
43+
JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
44+
JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
2245
steps:
2346
- uses: actions/checkout@v4
24-
- uses: actions/setup-java@v3
47+
- uses: actions/setup-java@v4
2548
with:
2649
distribution: temurin
2750
java-version: ${{ matrix.java }}
2851
cache: sbt
29-
- shell: bash
30-
run: |
31-
case ${{ matrix.name }} in
32-
"format")
33-
sbt -v ++${{ matrix.scala }} scalafmtSbt scalafmtAll
34-
git diff --exit-code
35-
;;
36-
"test")
37-
sbt -v ++${{ matrix.scala }} test
38-
;;
39-
*)
40-
echo "unknown job"
41-
exit 1
42-
esac
52+
- name: 'Run tests'
53+
run: sbt -v ++${{ matrix.scala }} test

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
lazy val supportedScalaVersions = List("3.4.1", "3.3.0")
1+
lazy val supportedScalaVersions = List("3.4.2", "3.3.0")
22

33
lazy val root = project
44
.in(file("."))
@@ -16,6 +16,6 @@ lazy val root = project
1616
"-unchecked",
1717
"-Wunused:all"
1818
),
19-
libraryDependencies += "org.scalameta" %% "munit" % "1.0.0-M11" % Test,
19+
libraryDependencies += "org.scalameta" %% "munit" % "1.0.0" % Test,
2020
Test / parallelExecution := false
2121
)

0 commit comments

Comments
 (0)