Skip to content

Commit

Permalink
Add CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
druzsan committed Feb 8, 2024
1 parent d01f317 commit 3d63651
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 4 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI

on: push

jobs:
# Check stage
check-format:
name: '🔍 Check Code Formatting'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
- run: python -m pip install -IU pytest
- run: make check-format
typecheck:
name: '🔍 Check Code Types'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
- run: python -m pip install -IU mypy
- run: make typecheck
lint:
name: '🔍 Lint'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
- run: python -m pip install -IU ruff
- run: make lint
# Test stage
unit-test:
name: '🧪 Unit Test'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
- run: python -m pip install -IU pytest
- run: make test
5 changes: 1 addition & 4 deletions tests/unit/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,7 @@ def test_invalid_matrix(self, matrix_yaml: str) -> None:
with pytest.raises((RuntimeError, TypeError, ValueError)):
parse_matrix(matrix_yaml)

@pytest.mark.parametrize(
"matrix_yaml",
["][", "}{"],
)
@pytest.mark.parametrize("matrix_yaml", ["][", "}{"])
def test_invalid_matrix_syntax(self, matrix_yaml: str) -> None:
with pytest.raises(yaml.parser.ParserError):
parse_matrix(matrix_yaml)

0 comments on commit 3d63651

Please sign in to comment.