Skip to content

Commit 58b6cbf

Browse files
committed
Fix GitHub Actions Rust workflow
1 parent ebe13d1 commit 58b6cbf

File tree

1 file changed

+17
-23
lines changed

1 file changed

+17
-23
lines changed

.github/workflows/rust.yml

+17-23
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
name: Rust
22

3-
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request_target:
8-
branches:
9-
- main
3+
on: [push]
4+
env:
5+
CARGO_INCREMENTAL: '0'
6+
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
7+
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
8+
109
jobs:
1110
build:
12-
runs-on: ubuntu-22.04
11+
runs-on: ubuntu-latest
1312
timeout-minutes: 10
1413
steps:
1514
- uses: actions/checkout@v2
@@ -19,22 +18,17 @@ jobs:
1918
toolchain: nightly
2019
override: true
2120
profile: default
22-
- name: Install coverage-run dependencies
23-
run: |
24-
sudo apt-get install -y llvm
25-
pip3 install --user toml
26-
cargo install rustfilt
27-
- name: Run Clippy check.
28-
uses: actions-rs/clippy-check@v1
29-
with:
30-
token: ${{ secrets.GITHUB_TOKEN }}
31-
args: --all-features
32-
- name: Run formatting check.
33-
run: cargo fmt --check
34-
- name: Build and test with coverage data
35-
run: ./coverage-run.py --no-open --no-html
21+
- name: Build
22+
run: cargo build --verbose
23+
- name: Run tests
24+
run: cargo test --verbose
25+
- name: Build documentation
26+
run: cargo doc --verbose
27+
- name: Generate coverage report
28+
id: coverage
29+
uses: actions-rs/grcov@v0.1
3630
- name: Upload coverage report to Coveralls
3731
uses: coverallsapp/github-action@master
3832
with:
3933
github-token: ${{ secrets.GITHUB_TOKEN }}
40-
path-to-lcov: scratchstack-aws-signature.lcov
34+
path-to-lcov: ${{ steps.coverage.outputs.report }}

0 commit comments

Comments
 (0)