on: [push]
name: Continuous Integration
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
name: Check
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run cargo check
uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: check
clippy:
name: Clippy
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: rustup component add clippy
- name: Run clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -Dwarnings
test:
name: Test Suite
strategy:
matrix:
platform: [ubuntu-latest] rust:
- 1.59.0 - stable
- beta
- nightly
runs-on: ${{ matrix.platform }}
timeout-minutes: 25
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install ${{ matrix.rust }} toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build artem
uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: build
- name: Run tests
if: contains(${{ matrix.target }}, "x86_64") uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: test
args: --locked --verbose