Files
nanoreth/.github/workflows/ci.yml
Bjerg 1e07fb6991 ci: move gh workflow to correct folder (#5)
* ci: move gh workflow to correct folder

* ci: name workflow

* ci: use nextest
2022-09-29 16:52:20 +02:00

64 lines
1.4 KiB
YAML

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 }}