Update and modify files for the project #29
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
name: Github Workflow for tests & linting | |
on: ["push", "pull_request"] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
linting: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: Gr1N/setup-poetry@v8 | |
- name: Install Dependencies | |
run: | | |
poetry install --with lint | |
- name: Run Black | |
run: poetry run black --check . | |
- name: Run isort | |
run: poetry run isort --check-only . | |
- name: Run flake8 | |
run: poetry run flake8 . | |
type-check: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: Gr1N/setup-poetry@v8 | |
- name: Install Dependencies | |
run: | | |
poetry install --with lint | |
- name: Run MyPy | |
run: poetry run mypy . | |
functional: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: Gr1N/setup-poetry@v8 | |
- name: Install Dependencies | |
run: | | |
poetry install --with dev | |
- name: Run Tests | |
run: poetry run pytest | |
fuzzing: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install Poetry | |
uses: Gr1N/setup-poetry@v8 | |
- name: Install Dependencies | |
run: | | |
poetry install --with dev | |
- name: Run Tests | |
run: poetry run pytest |