-
Notifications
You must be signed in to change notification settings - Fork 24
69 lines (64 loc) · 1.81 KB
/
Copy pathplt-build-test.yaml
File metadata and controls
69 lines (64 loc) · 1.81 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
name: PLT scheduler build and run tests
on:
push:
branches:
- main
paths:
- '.github/workflows/plt-build-test.yaml'
- 'concordium-base'
- 'plt/**'
pull_request:
paths:
- '.github/workflows/plt-build-test.yaml'
- 'concordium-base'
- 'plt/**'
env:
CARGO_TERM_COLOR: always # implicitly adds '--color=always' to all cargo commands
jobs:
rustfmt:
name: Check formatting
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Run rustfmt
working-directory: plt
run: |
rustup component add rustfmt
cargo fmt --check
clippy_test:
name: Run Clippy and tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install tools
working-directory: plt
run: |
rustup component add clippy llvm-tools
cargo install cargo-llvm-cov --locked
- name: Clippy
working-directory: plt
run: |
cargo clippy --locked --all-targets --all-features -- -D warnings
- name: Test
working-directory: plt
run: |
cargo llvm-cov test --locked --all-targets --all-features --no-report
- name: Generate a report of the tests above.
working-directory: plt
run: |
cargo llvm-cov report --lcov --output-path plt_lcov.info
# Options documented here: https://github.com/codecov/codecov-action
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
disable_telem: true
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
files: plt/plt_lcov.info