-
Notifications
You must be signed in to change notification settings - Fork 7
79 lines (76 loc) · 2.68 KB
/
Copy pathci.yml
File metadata and controls
79 lines (76 loc) · 2.68 KB
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
name: CI
on:
pull_request:
branches: ['**']
push:
branches: ['**']
tags: [v*]
permissions:
contents: write # release-drafter, auto-merge requirement
pull-requests: write # labeler, auto-merge requirement
jobs:
build:
if: |
github.event_name == 'push' ||
github.event.pull_request.head.repo.full_name != github.repository ||
github.event.pull_request.user.login == 'softwaremill-ci'
runs-on: ubuntu-24.04
env:
JAVA_OPTS: '-Xmx4G'
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 21
cache: 'sbt'
- uses: sbt/setup-sbt@3e125ece5c3e5248e18da9ed8d2cce3d335ec8dd # v1, specifically v1.1.14
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Install scala-cli
uses: VirtusLab/scala-cli-setup@68bd9c30954d20e6cb6ddaf01b3b38336f25df4b # main, specifically v1.10.1
with:
jvm: '' # needed because scala-cli-setup otherwise forces the installation of their default JVM (17)
- name: Check formatting
run: sbt -v scalafmtCheckAll
- name: Compile
run: sbt -v compile
# TODO uncomment after release
# - name: Verify that examples compile using Scala CLI
# run: sbt -v "project examples" verifyExamplesCompileUsingScalaCli
- name: Compile documentation
run: sbt -v compileDocs
- name: Unit tests
run: sbt -v test
- name: Client conformance tests
run: sbt -v "clientConformance/conformance client --suite core"
- name: Server conformance tests
run: sbt -v "serverConformance/conformance server"
- name: Integration tests
run: sbt -v "testOnly -- -n Integration"
- uses: actions/upload-artifact@v5
if: success() || failure()
with:
name: 'tests-results'
path: '**/test-reports/TEST*.xml'
publish:
uses: softwaremill/github-actions-workflows/.github/workflows/publish-release.yml@main
needs: [build]
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v'))
secrets: inherit
with:
java-opts: "-Xmx4G"
sttp-native: 1
label:
if: github.event.pull_request.user.login == 'softwaremill-ci'
uses: softwaremill/github-actions-workflows/.github/workflows/label.yml@main
secrets: inherit
auto-merge:
if: github.event.pull_request.user.login == 'softwaremill-ci'
needs: [ build, label ]
uses: softwaremill/github-actions-workflows/.github/workflows/auto-merge.yml@main
secrets: inherit