Skip to content

Use black and isort #150

Use black and isort

Use black and isort #150

Workflow file for this run

name: tests
on:
push:
branches:
- main
paths-ignore:
- '**.md'
- 'imgs/**'
- 'LICENSE'
- '**/__about__.py'
pull_request:
branches:
- main
paths-ignore:
- '**.md'
- 'imgs/**'
- 'LICENSE'
- '**/__about__.py'
jobs:
run:
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Ensure latest pip
run: python -m pip install --upgrade pip
- name: Install hatch
run: pip install hatch
- if: matrix.python-version == '3.9' && runner.os == 'Linux'
name: Lint
run: hatch run lint:all
- name: Run tests
run: hatch run test-all
semgrep:
name: Semgrep Scan
runs-on: ubuntu-latest
container:
image: returntocorp/semgrep
# Skip any PR created by dependabot to avoid permission issues:
if: (github.actor != 'dependabot[bot]')
steps:
- uses: actions/checkout@v3
- run: semgrep ci
env:
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}