forked from scalapb/zio-grpc
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (56 loc) · 1.58 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
name: CI
on: [push, pull_request]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
build:
strategy:
matrix:
scala: [2_12, 2_13, 3]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: 8
distribution: temurin
cache: sbt
- name: Set up node.js
uses: actions/setup-node@v4
with:
node-version: "18.16.1"
- name: Mount caches
uses: actions/cache@v3
with:
path: |
~/.sbt
~/.ivy2/cache
~/.cache/coursier
~/.cache/ms-playwright
key: ${{ runner.os }}-sbt-${{matrix.scala}}-${{ hashFiles('**/*.sbt') }}
- name: Formatting
run: |
sbt scalafmtCheck Test/scalafmtCheck scalafmtSbtCheck
- name: Compile and test (JVM)
run: |
sbt coreJVM${{matrix.scala}}/test e2eJVM${{matrix.scala}}/test
# e2eJVM${{matrix.scala}}/it:test
- name: Compile and test (JS)
run: |
sbt coreJS${{matrix.scala}}/test
- name: Run grpc-web e2e test
if: ${{ matrix.scala != 3 }}
run: |
docker-compose -f ./examples/fullapp/docker-compose.yaml up -d
sbt e2eWebJS${{matrix.scala}}/fastOptJS/webpack e2eWebJVM${{matrix.scala}}/test
docker-compose -f ./examples/fullapp/docker-compose.yaml down
- name: Examples
run: |
.github/workflows/test_examples.sh
# Single final job for mergify.
ci-passed:
runs-on: ubuntu-latest
needs: build
steps:
- run: ':'