Repository navigation
77 lines (60 loc) · 2.04 KB
/
Copy pathrust.yml
File metadata and controls
77 lines (60 loc) · 2.04 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
76
77
name: Dank Test/Coverage Runner
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
env:
CARGO_TERM_COLOR: always
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Lint
run: cargo fmt --all -- --check
test:
runs-on: ubuntu-latest
container:
image: ghcr.io/psychedelic/dank-explorer-ci:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.PRIVATE_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Rust toolchain
run: .github/scripts/rust-toolchain.sh
- name: Target clean cache
id: target-clean-cache
uses: actions/cache@v2
with:
path: .github/target_clean
key: cache-${{ runner.os }}-target-clean-cache-${{ hashFiles('.github/target_clean') }}
- name: Target dir cache
id: target-dir-cache
uses: actions/cache@v2
with:
path: target
key: cache-${{ runner.os }}-target-dir-cache-${{ hashFiles('cargo.lock') }}
- name: Target dir clean
# if: steps.target-dir-cache.outputs.cache-hit != 'true' || steps.target-clean-cache.outputs.cache-hit != 'true'
run: cargo clean
- name: Build
run: node build.js
- name: Cargo Test
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --no-fail-fast
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Cpanic=abort -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
- name: Collect Coverage
id: coverage
uses: actions-rs/grcov@v0.1
- name: Coveralls upload
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ${{ steps.coverage.outputs.report }}