Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DO NOT MERGE Tesging python-test-suite.yml with windows-latest #782

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 6 additions & 39 deletions .github/workflows/python-test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
unit-testing:
strategy:
matrix:
python-version: [ "3.8.x", "3.9.x", "3.10.x", "3.11.x", "3.12.x" ]
os: [ "ubuntu-latest", "macos-latest" ]
# TODO: add windows, ubuntu:20.04
python-version: [ "3.9.x" ]
os: [ "windows-latest" ]
# TODO: add ubuntu:20.04
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4
Expand All @@ -37,40 +37,7 @@ jobs:
- name: Install uv
run: curl -LsSf https://astral.sh/uv/0.4.7/install.sh | sh

- name: Install all projects dependencies (with the requested python version)
- name: Check python version
working-directory: python
run: uv sync --python $(which python3) --all-extras --dev

- name: Run ruff check
working-directory: python
run: uv run --python $(which python3) ruff check --verbose

- name: Run ruff format --check
working-directory: python
run: uv run --python $(which python3) ruff format --check --verbose

- name: Run mypy
working-directory: python
run: uv run --python $(which python3) mypy src/magika tests

- name: Run the python tests suite
working-directory: python
run: uv run --python $(which python3) pytest tests -m "not slow"

- name: Run magika --version
working-directory: python
run: uv run magika --version
shell: bash # Allows for cross-platform

- name: Run magika with tests_data
working-directory: python
# TODO(https://github.com/google/magika/issues/780): Remove "grep || exit 1" when fixed.
run: '(uv run magika -r ../tests_data/basic | grep "code\.asm.*Assembly") || exit 1'

- name: Run "magika cli" quick tests
working-directory: python
run: uv run scripts/run_quick_test_magika_cli.py

- name: Run "magika module" quick tests
working-directory: python
run: uv run scripts/run_quick_test_magika_module.py
run: uv run --python 3.9 python --version