-
-
Notifications
You must be signed in to change notification settings - Fork 3
32 lines (32 loc) · 1.04 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
name: Test
on:
push:
branches-ignore:
- magick
- 'gh-readonly-queue/**'
pull_request:
merge_group:
jobs:
test:
strategy:
matrix:
toolchain: [stable, 1.59]
sysctl: ["vm.memfd_noexec=0", "vm.memfd_noexec=1"]
include:
- toolchain: 1.59
# https://users.rust-lang.org/t/skip-doctest-from-command-line/57379/2
test_args: --lib --bins --tests
fail-fast: false
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: sudo sysctl -w ${{ matrix.sysctl }}
- run: rustup default ${{ matrix.toolchain }}
- run: cargo test --locked ${{ matrix.test_args }}
- run: cargo test --locked --no-default-features ${{ matrix.test_args }}
- run: cargo fmt -- --check
if: ${{ matrix.toolchain == 'stable' }}
- run: cargo clippy --locked --all-targets -- -D warnings
if: ${{ matrix.toolchain == 'stable' }}
- run: RUSTDOCFLAGS="-D warnings" cargo doc --locked
if: ${{ matrix.toolchain == 'stable' }}