-
Notifications
You must be signed in to change notification settings - Fork 14
40 lines (36 loc) · 1.09 KB
/
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
37
38
39
40
name: Tests
on:
push:
branches: [main]
pull_request:
branches: ["*"]
env:
MAPBOX_TOKEN: token
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Run build and tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Rust toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
--default-toolchain stable \
--profile minimal \
--component rustfmt clippy \
-y
- name: Build crate and examples
run: |
cargo build --workspace --all-targets --all-features
pushd examples; cargo build --workspace --all-targets --all-features; popd
- name: Clippy
run: |
cargo clippy --workspace --all-targets --all-features -- --deny clippy::all
pushd examples; cargo clippy --workspace --all-targets --all-features -- --deny clippy::all; popd
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Unit tests
run: cargo nextest run --retries 3