2019-09-21 11:10:55 +00:00
|
|
|
on: [push, pull_request]
|
|
|
|
|
2021-10-01 11:35:43 +00:00
|
|
|
name: Continuous integration
|
|
|
|
|
2019-09-21 11:10:55 +00:00
|
|
|
jobs:
|
2021-10-01 11:35:43 +00:00
|
|
|
check:
|
|
|
|
name: check
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
- uses: Swatinem/rust-cache@v1
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: check
|
|
|
|
|
|
|
|
test:
|
|
|
|
name: test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
- uses: Swatinem/rust-cache@v1
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
|
|
|
|
fmt:
|
|
|
|
name: rustfmt
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
2021-10-01 11:39:17 +00:00
|
|
|
# rustfmt uses unstable features
|
|
|
|
toolchain: nightly
|
2021-10-01 11:35:43 +00:00
|
|
|
override: true
|
|
|
|
- run: rustup component add rustfmt
|
|
|
|
- uses: Swatinem/rust-cache@v1
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: fmt
|
|
|
|
args: --all -- --check
|