mirror of
https://github.com/OMGeeky/confique.git
synced 2025-12-27 23:08:00 +01:00
38 lines
806 B
YAML
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
|