add CI #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CARGO_TERM_COLOR: always | |
# Make sure CI fails on all warnings, including Clippy lints | |
RUSTFLAGS: "-Dwarnings" | |
jobs: | |
lint: | |
# Name the Job | |
name: Lint Code Base | |
# Set the agent to run on | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
# Full git history is needed to get a proper | |
# list of changed files within `super-linter` | |
fetch-depth: 0 | |
- name: Lint Code Base | |
uses: super-linter/super-linter@v5 | |
env: | |
VALIDATE_ALL_CODEBASE: true | |
VALIDATE_RUST_2021: true | |
VALIDATE_RUST_CLIPPY: true | |
DEFAULT_BRANCH: master | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
test: | |
name: Rust tests | |
strategy: | |
matrix: | |
environment: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.environment }} | |
steps: | |
- uses: actions/checkout@v3 | |
- run: rustup update | |
- run: cargo test |