Skip to content

Add initial GitHub ci #4

Add initial GitHub ci

Add initial GitHub ci #4

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- "*"
pull_request:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: "3.9"
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: pip install '.[dev]'
- run: pytest -s tests
- run: cargo test --all
lint_rust:
name: Lint Rust
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: "3.9"
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
- run: cargo clippy --all -- -D warnings
lint_python:
name: Lint Python
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: "3.9"
- run: pip install '.[dev]'
- run: black --check python
- run: black --check tests