ci: move gh workflow to correct folder (#5)

* ci: move gh workflow to correct folder

* ci: name workflow

* ci: use nextest
This commit is contained in:
Bjerg
2022-09-29 16:52:20 +02:00
committed by GitHub
parent 4dc32e9f76
commit 1e07fb6991

63
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,63 @@
on:
push:
branches:
- master
pull_request:
env:
NEXTEST_EXPERIMENTAL_FILTER_EXPR: 1
CARGO_TERM_COLOR: always
name: ci
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- uses: Swatinem/rust-cache@v1
with:
cache-on-failure: true
- name: Install latest nextest release
uses: taiki-e/install-action@nextest
- name: Test with latest nextest release
uses: actions-rs/cargo@v1
with:
command: nextest
args: run --locked --workspace --all-features
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
components: rustfmt, clippy
override: true
- uses: Swatinem/rust-cache@v1
with:
cache-on-failure: true
- name: cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all --check
- name: cargo clippy
uses: actions-rs/clippy-check@v1
with:
args: --all --all-features -- -D warnings
token: ${{ secrets.GITHUB_TOKEN }}