Skip to content

Merge pull request #22 from asomers/patch-1 #110

Merge pull request #22 from asomers/patch-1

Merge pull request #22 from asomers/patch-1 #110

Workflow file for this run

name: tests
on:
push: { branches: ["master", "main"] }
pull_request: { branches: "*" }
jobs:
build_and_test:
name: Linux
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [stable, beta, nightly, stable-musl]
include:
- build: stable
os: ubuntu-latest
rust: stable
target: x86_64-unknown-linux-gnu
- build: beta
os: ubuntu-latest
rust: beta
target: x86_64-unknown-linux-gnu
- build: nightly
os: ubuntu-latest
rust: nightly
target: x86_64-unknown-linux-gnu
- build: stable-musl
os: ubuntu-latest
rust: stable
target: x86_64-unknown-linux-musl
steps:
- name: Checkout code
uses: actions/checkout@master
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-${{ matrix.rust }}-cargo
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
components: clippy
target: ${{ matrix.target }}
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
toolchain: ${{ matrix.rust }}
args: --all-features --color=always --target ${{ matrix.target }}
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
toolchain: ${{ matrix.rust }}
args: --all-features --color=always --target ${{ matrix.target }}
- name: Clippy
uses: actions-rs/clippy-check@v1
if: matrix.build == 'nightly'
with:
toolchain: ${{ matrix.rust }}
token: ${{ secrets.GITHUB_TOKEN }}
args: --release --all-features