-
-
Notifications
You must be signed in to change notification settings - Fork 10
64 lines (62 loc) · 1.61 KB
/
server-cicd.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
name: Server CI/CD
on:
pull_request:
branches: [ main ]
types: [ opened, reopened, synchronize ]
push:
branches: [ main ]
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v4
- name: Setup | Rust
uses: actions-rust-lang/[email protected]
with:
toolchain: stable
components: clippy
cache: false
- name: Setup | Rust-Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
server
- name: Setup | Setup Git to run feedback unit-tests
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- run: cargo test --workspace
working-directory: server
linting:
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v4
- name: Setup | Rust
uses: actions-rust-lang/[email protected]
with:
toolchain: stable
cache: false
- name: Setup | Rust-Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
server
- run: cargo clippy --workspace
working-directory: server
server-build:
uses: ./.github/workflows/_docker-build.yml
needs:
- tests
- linting
with:
image_suffix: server
context: ./server
dockerfile: Dockerfile
permissions:
id-token: write
contents: read
packages: write
attestations: write