-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (86 loc) · 2.47 KB
/
on_commits.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
env:
RUST_VERSION: 1.67.0
CARGO_TERM_COLOR: always
jobs:
Dependency-audit:
strategy:
matrix:
runs-on:
- ubuntu-latest
runs-on: ${{ matrix.runs-on }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Audit dependencies
uses: EmbarkStudios/cargo-deny-action@v1
Run-tests:
name: Run test and upload coverage report
needs:
- Dependency-audit
strategy:
matrix:
runs-on:
- ubuntu-latest
runs-on: ${{ matrix.runs-on }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set minimal supported Rust version
run: |
rustup default ${RUST_VERSION}
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Remove artifacts that may affect the coverage results of packages
run: |
cargo llvm-cov clean --workspace
- name: Run tests and generate code coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: lcov.info
flags: unittests
name: PHASEXave
verbose: true
Test-tools:
needs:
- Dependency-audit
- Run-tests
strategy:
matrix:
runs-on:
- macOS-13
- macOS-12
- macOS-11
- ubuntu-latest
- windows-latest
runs-on: ${{ matrix.runs-on }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set minimal supported Rust version
run: |
rustup default ${RUST_VERSION}
- name: Build
run: |
cargo build --release --bin date-cli
cargo build --release --bin calendar-cli
- name: Date CLI
run: |
cargo run --release --quiet --bin date-cli -- -v 1
cargo run --release --quiet --bin date-cli -- -v 2
cargo run --release --quiet --bin date-cli -- -v 3
- name: Calendar CLI
run: |
cargo run --release --quiet --bin calendar-cli -- -v 1
cargo run --release --quiet --bin calendar-cli -- -v 2
cargo run --release --quiet --bin calendar-cli -- -v 3