Skip to content

Merge pull request #8 from Jety567/main #95

Merge pull request #8 from Jety567/main

Merge pull request #8 from Jety567/main #95

Workflow file for this run

name: Test
on:
push:
workflow_dispatch:
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
jobs:
build-and-test:
name: Build and Test
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
os: [ubuntu-20.04, macos-10.15, windows-2019]
toolchain: [1.60.0]
experimental: [false]
include:
- os: ubuntu-latest
toolchain: stable
experimental: true
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Rust ${{ matrix.toolchain }}
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
components: rustfmt, clippy
override: true
- name: Install Selfie Toolchain
if: ${{ contains(matrix.os, 'windows') }}
# MinGw64 and Git is already installed
# https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md
run: choco install make -y
- name: Check Format
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
- name: Clippy
uses: actions-rs/clippy-check@v1
# execute Clippy with Github integration for the target platform (Linux with fixed toolchain version)
if: ${{ contains(matrix.os, 'ubuntu') && !matrix.experimental }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets --all-features -- -D warnings
name: Clippy
- name: Clippy CLI only
uses: actions-rs/cargo@v1
# execute CLI-only version of Clippy for all platforms besides the target platform
if: ${{ !(contains(matrix.os, 'ubuntu') && !matrix.experimental) }}
with:
command: clippy
args: --all-targets --all-features -- -D warnings
- name: Build
run: cargo build
- name: Doc
run: cargo doc
- name: Test
uses: actions-rs/cargo@v1
with:
command: test