-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (55 loc) · 1.3 KB
/
reusable-build.yaml
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
name: build
on: workflow_call
jobs:
frontend:
runs-on: ubuntu-22.04
container:
image: node:18-alpine3.17
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install dependencies
run: |
cd frontend
yarn install
- name: Check code quality
run: |
cd frontend
yarn lint
- name: Test svelte code
run: |
cd frontend
yarn test
- name: Build svelte app
run: |
cd frontend
yarn build
- name: Upload svelte artifact
uses: actions/upload-artifact@v3
with:
name: svelte-app
path: wwwroot
backend:
runs-on: ubuntu-22.04
container:
image: mcr.microsoft.com/devcontainers/rust:1-1-bookworm
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Check code quality
run: |
cd backend
cargo clippy
- name: Run tests
run: |
cd backend
cargo test
- name: Build app
run: |
cd backend
cargo build --release
- name: Upload rust artifact
uses: actions/upload-artifact@v3
with:
name: rust-app
path: backend/target/release/backend