Files
confique/.github/workflows/ci.yaml
2021-07-27 17:12:24 +02:00

38 lines
806 B
YAML

name: CI
on:
pull_request:
push:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: --deny warnings
jobs:
check:
name: 'Build & test'
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Prepare cache key
run: |
cargo generate-lockfile
cp Cargo.lock cache-fingerprint
echo $RUSTFLAGS >> cache-fingerprint
echo $(rustc -V) >> cache-fingerprint
- name: Restore cargo cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('cache-fingerprint') }}
- name: Build
run: cargo build
- name: Run tests
run: |
cargo test
cargo test --no-default-features