-
Notifications
You must be signed in to change notification settings - Fork 33
75 lines (65 loc) · 1.62 KB
/
ci.yaml
File metadata and controls
75 lines (65 loc) · 1.62 KB
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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
schedule:
- cron: '25 4 * * *'
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
license:
name: Check license header
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: apache/skywalking-eyes/header@501a28d2fb4a9b962661987e50cf0219631b32ff
with:
config: .github/licenserc.yaml
security:
name: Audit security
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install cargo-audit
run: cargo install cargo-audit --version 0.22.0 --locked
- name: Audit dependencies
run: cargo audit
style:
name: Audit style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- name: Check format
run: cargo fmt --all -- --check
test:
name: Run tests
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install mysql-client
if: ${{ contains(matrix.os, 'macos') }}
run: brew install mysql@8.4
- run: cargo build --workspace
- run: |
export PATH="/opt/homebrew/opt/mysql@8.4/bin:$PATH"
cargo test --workspace --all-features
pass:
name: All tests passed
runs-on: ubuntu-latest
needs:
- security
- style
- test
steps:
- run: exit 0