workflow: add tests to workflow #170
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
# Build, test and check the code against the linter and clippy | |
name: Build, Test, Format and Clippy | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build_and_test: | |
name: Build and Cargo checks | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Rust 1.67.1 | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.67.1 | |
override: true | |
components: rustfmt, clippy | |
- name: Build | |
run: cargo build | |
- name: Test | |
run: cargo test | |
- name: Fmt | |
run: cargo fmt --check --quiet | |
- name: Clippy | |
run: cargo clippy --no-deps -- --deny warnings | |
tests: | |
name: Python Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set Up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install | |
run: | | |
pip install --upgrade pip | |
pip install ./py/pica/ | |
pip install pytest=="7.4.4" | |
pip install pytest_asyncio=="0.23.3" | |
- name: Build Pica | |
- run: pytest --log-cli-level=DEBUG -v |