[pre-commit.ci] pre-commit autoupdate #99
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: CI | |
on: [pull_request] | |
jobs: | |
package-build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11"] | |
steps: | |
- name: Checkout Project Package | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Install tox | |
run: pip install tox tox-gh-actions | |
- name: Test | |
run: poetry run tox | |
unittest: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- name: Checkout Project Package | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Install Dependencies | |
run: poetry install --no-root -v | |
- name: Set Python Path | |
run: echo "PYTHONPATH=src" >> $GITHUB_ENV | |
- name: Test | |
run: poetry run pytest tests/ --cov=src/ --cov-report xml:coverage.xml | |
- name: Report Coverage | |
uses: orgoro/[email protected] | |
with: | |
coverageFile: coverage.xml | |
token: ${{ secrets.GITHUB_TOKEN }} | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- name: Checkout Project Package | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Install Python Dependencies | |
run: poetry install --no-root -v | |
- name: Flake8 | |
run: poetry run flake8 src/ tests/ | |
- name: Isort | |
run: poetry run isort -c src/ tests/ | |
- name: Black | |
run: poetry run black --check src/ tests/ |