name: "github_actions_ci"
on:
pull_request:
push:
branches:
- master
- main
schedule:
- cron: '00 01 * * *'
jobs:
test:
name: pipeline_run_tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
build: [pinned, stable, beta, nightly, macos, win-gnu, win-msvc]
include:
- build: pinned
os: ubuntu-18.04
rust: 1.43.0
- build: stable
os: ubuntu-latest
rust: stable
- build: beta
os: ubuntu-latest
rust: beta
- build: nightly
os: ubuntu-latest
rust: nightly
- build: macos
os: macOS-latest
rust: stable
- build: win-gnu
os: windows-latest
rust: stable-x86_64-gnu
- build: win-msvc
os: windows-latest
rust: stable
steps:
- name: checkout_repo
uses: actions/checkout@v2
- name: install_rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
profile: minimal
- name: build_workspace_crates
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose --all
- name: test_workspace_crates
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --all
- name: test_workspace_with_all_features
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --all --all-features
rustfmt:
name: pipeline_rustfmt
runs-on: ubuntu-18.04
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: install_rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: rustfmt
- name: check_formatting
run: |
cargo fmt --all -- --check
clippy:
name: pipeline_clippy
runs-on: ubuntu-18.04
steps:
- name: checkout_repo
uses: actions/checkout@v2
- name: install_rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: clippy
- name: check_with_clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --workspace
cargo_deny:
name: pipeline_cargo_deny
runs-on: ubuntu-latest
strategy:
matrix:
checks:
- advisories
- bans licenses sources
continue-on-error: ${{ matrix.checks == 'advisories' }}
steps:
- uses: actions/checkout@v2
- uses: EmbarkStudios/cargo-deny-action@v1