Skip to content

Commit 70e780c

Browse files
authored
cicd: add pr merge ci (#16)
1 parent cbbed99 commit 70e780c

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: admin web check
2+
on:
3+
push:
4+
branches:
5+
- 'main'
6+
7+
jobs:
8+
check_backend:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
with:
13+
submodules: true
14+
15+
- name: Setup node
16+
uses: actions/setup-node@v3
17+
with:
18+
node-version: 18
19+
cache: 'npm'
20+
cache-dependency-path: 'admin-web/package-lock.json'
21+
22+
- name: build admin-web
23+
run: cd admin-web && npm run build && cd ../
24+
25+
- uses: coursier/cache-action@v6
26+
- uses: coursier/setup-action@v1
27+
with:
28+
jvm: temurin:1.17
29+
30+
- name: build backend
31+
run: cd backend && sbt compile && cd ../
32+
33+
check_client:
34+
strategy:
35+
max-parallel: 1
36+
fail-fast: true
37+
matrix:
38+
settings:
39+
- host: ubuntu-latest
40+
target: x86_64-unknown-linux-gnu
41+
build: make release-linux
42+
- host: macos-latest
43+
target: x86_64-apple-darwin
44+
build: make release-mac-x86_64
45+
runs-on: ${{ matrix.settings.host }}
46+
steps:
47+
- uses: actions/checkout@v3
48+
with:
49+
submodules: true
50+
- name: Install Rust
51+
uses: actions-rs/toolchain@v1
52+
with:
53+
toolchain: stable
54+
target: ${{ matrix.settings.target }}
55+
profile: minimal
56+
- name: Set up cargo cache
57+
uses: actions/cache@v3
58+
continue-on-error: false
59+
with:
60+
path: |
61+
~/.cargo/bin/
62+
~/.cargo/registry/index/
63+
~/.cargo/registry/cache/
64+
~/.cargo/git/db/
65+
client/target/
66+
key: ${{ matrix.settings.host }}-${{ matrix.settings.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}
67+
restore-keys: ${{ matrix.settings.host }}-cargo-${{ matrix.settings.target }}
68+
- name: Build
69+
run: ${{ matrix.settings.build }}
70+

0 commit comments

Comments
 (0)