-
Notifications
You must be signed in to change notification settings - Fork 16
85 lines (78 loc) · 2.31 KB
/
test.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
name: test
on:
push:
branches: [ "main" ]
pull_request:
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
test-js:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with: { tool: just }
- uses: actions/setup-node@v4
with:
node-version-file: 'js/.nvmrc'
cache: 'npm'
cache-dependency-path: 'js/package-lock.json'
- name: Lint JS code. If fails, run `just fmt-js` to reformat, and `just lint-js` to see issues locally
run: just lint-js
- run: just test-js
bench-js:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with: { tool: just }
- uses: actions/setup-node@v4
with:
node-version-file: 'js/.nvmrc'
cache: 'npm'
cache-dependency-path: 'js/package-lock.json'
- name: Bench JS decoder
run: just bench-js
lint-java:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with: { tool: just }
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Lint Java code. If fails, run `just fmt-java` to reformat, and `just lint-java` to see issues locally
run: just lint-java
test-java:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with: { tool: just }
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- uses: gradle/actions/setup-gradle@v3
- run: just test-java
- run: just test-java-cli
# This final step is needed to mark the entire workflow as successful
done:
# Don't change this name - it is used by the merge protection rules
name: CI Finished
runs-on: ubuntu-latest
# List of all the other jobs that must pass for this job to start
needs: [ test-java, lint-java, test-js, bench-js ]
steps:
- name: Finished
run: echo "CI finished successfully"