Skip to content

Commit

Permalink
workflow: add tests to workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverBzH committed Jan 23, 2024
1 parent e6128a6 commit 36bfb86
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Build, test and check the code against the linter and clippy
name: Build, Test, Format and Clippy
name: Build, Check, Test

on:
push:
Expand All @@ -9,13 +8,12 @@ on:

env:
CARGO_TERM_COLOR: always
PY_COLORS: "1"

jobs:
build_and_test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
name: Build, Check, Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust 1.67.1
Expand All @@ -24,6 +22,16 @@ jobs:
toolchain: 1.67.1
override: true
components: rustfmt, clippy
- 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
run: cargo build
- name: Test
Expand All @@ -32,3 +40,5 @@ jobs:
run: cargo fmt --check --quiet
- name: Clippy
run: cargo clippy --no-deps -- --deny warnings
- name: Run Python tests suite
run: pytest --log-cli-level=DEBUG -v
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
format:
name: Check Python formatting
name: Check format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -20,4 +20,4 @@ jobs:
run: |
pip install --upgrade pip
pip install black=="23.12.1"
- run: black --check scripts/ --exclude pica
- run: black --check tests/

0 comments on commit 36bfb86

Please sign in to comment.