-
Notifications
You must be signed in to change notification settings - Fork 93
41 lines (38 loc) · 1.03 KB
/
tests.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
37
38
39
40
41
name: Lint, format, and test
on:
push:
branches:
- 'main'
paths-ignore:
- 'docs/**'
- 'README.md'
- '.github/workflows/release.yml'
- '.github/workflows/official-site.yml'
pull_request:
branches:
- 'main'
env:
CARGO_TERM_COLOR: always
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Free up disk space
run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /usr/local/share/boost "$AGENT_TOOLSDIRECTORY" /var/lib/apt/lists/*
- uses: actions/checkout@v3
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: tests-${{ runner.os }}-check-${{ hashFiles('**/Cargo.lock') }}
restore-keys: tests-${{ runner.os }}-check-
- run: cargo fmt --all -- --check
- run: cargo clippy
- run: cargo test
- run: cargo test --all-features