Merge pull request #23 from s-bose/v0.1.10-dev #117
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: Tests | |
on: | |
push: | |
branches: | |
- "master" | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ['3.10', '3.11'] | |
poetry-version: ['1.4.2'] | |
os: ['ubuntu-latest', 'windows-latest'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry | |
uses: abatilo/actions-poetry@v2 | |
with: | |
poetry-version: ${{ matrix.poetry-version }} | |
- name: Install dependencies | |
run: poetry install --all-extras | |
- name: Upgrade pip | |
run: poetry run pip install --upgrade pip | |
- name: Run black | |
run: poetry run black . --check | |
- name: Run isort | |
run: poetry run isort . --check-only --profile black | |
- name: Run flake8 | |
run: poetry run flake8 . | |
- name: Run bandit | |
run: poetry run bandit . | |
- name: Run saftey | |
run: poetry run safety check -i 70612 # ignore Jinja2 vuln as the templates are sandboxed | |
- name: Run Tests | |
run: bash ./scripts/coverage.sh | |
- name: Run Coverage xml | |
run: | | |
poetry run coverage report --show-missing | |
poetry run coverage xml | |
- name: Codecov coverage | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |