2021-05-06 16:24:57 +00:00
|
|
|
# Regular testing.
|
2020-06-08 20:00:46 +00:00
|
|
|
name: pipeline
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: Test
|
|
|
|
runs-on: ubuntu-latest
|
2020-08-27 14:30:04 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-01-25 01:44:30 +00:00
|
|
|
rust: [1.43.0, nightly]
|
2020-06-08 20:00:46 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
2020-08-27 14:30:04 +00:00
|
|
|
toolchain: ${{ matrix.rust }}
|
2020-06-08 20:00:46 +00:00
|
|
|
override: true
|
|
|
|
- uses: actions-rs/cargo@v1
|
2020-08-25 17:51:27 +00:00
|
|
|
name: Default test
|
|
|
|
with:
|
2021-06-16 16:45:13 +00:00
|
|
|
# Our intention here is to test `naga` with no features enabled. But
|
|
|
|
# since `cli` is the default package, a plain `cargo test` will build
|
|
|
|
# `naga` with the features requested in `cli/Cargo.toml`. Passing
|
|
|
|
# `--package naga` causes us to use the default features in the
|
|
|
|
# top-level `Cargo.toml` instead.
|
2020-08-25 17:51:27 +00:00
|
|
|
command: test
|
2021-06-16 16:45:13 +00:00
|
|
|
args: --package naga
|
2020-08-25 17:51:27 +00:00
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
name: Test all features
|
2020-06-08 20:00:46 +00:00
|
|
|
with:
|
|
|
|
command: test
|
2021-06-13 12:38:40 +00:00
|
|
|
args: --all-features --workspace
|
2021-04-14 18:20:48 +00:00
|
|
|
- name: Check snapshots
|
|
|
|
run: git diff --exit-code -- tests/out
|
2020-06-08 20:00:46 +00:00
|
|
|
clippy:
|
|
|
|
name: Clippy
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
- run: rustup component add clippy
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: clippy
|
2021-06-13 12:38:40 +00:00
|
|
|
args: --all-features --workspace -- -D warnings
|