name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
test:
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: cargo install cargo-readme
- run: cargo readme -t .README.tpl > README.md
- run: |
git diff --exit-code || {
echo
echo "============================================================"
echo
echo "README.md is not up to date! Run"
echo
echo " $ cargo readme -t .README.tpl > README.md"
echo
echo "to update it."
exit 1
}