-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (35 loc) · 1011 Bytes
/
build_test.yml
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
name: Build and Test
on:
push:
workflow_dispatch:
jobs:
fmt-lint-build-test:
runs-on: ubuntu-latest
env:
DATABASE_URL: sqlite://${{ github.workspace }}/examples/universe.db
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Formatting
run: cargo fmt --check
- name: Linting
run: cargo clippy -- -D warnings
- name: Build dev
run: cargo build
- name: Test dev
run: cargo test
- name: Build release
run: cargo build --release
- name: Test release
run: cargo test --release
- name: Install code coverage tool
run: cargo install cargo-tarpaulin
- name: Generate code coverage
run: cargo tarpaulin --out Html
- name: Archive code coverage results
uses: actions/upload-artifact@v1
with:
name: code-coverage-report
path: tarpaulin-report.html