loosen structlog version dependency #909
Workflow file for this run
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: | |
env: | |
HATCH_VERSION: "v1.7.0" # keep in sync with deploy.yml | |
jobs: | |
format-black: | |
name: Format black | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install Hatch | |
run: pip install hatch==${{ env.HATCH_VERSION }} | |
- name: Run black | |
run: hatch run code-quality:format | |
mypy: | |
name: MyPy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install Hatch | |
run: pip install hatch==${{ env.HATCH_VERSION }} | |
- name: Run mypy | |
run: hatch run code-quality:types | |
lint: | |
name: Lint Code | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install Hatch | |
run: pip install hatch==${{ env.HATCH_VERSION }} | |
- name: Run pylint | |
run: hatch run code-quality:lint | |
isort: | |
name: Sort imports | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install Hatch | |
run: pip install hatch==${{ env.HATCH_VERSION }} | |
- name: Run mypy | |
run: hatch run code-quality:sort | |
pydocstyle: | |
name: Check docstrings | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install Hatch | |
run: pip install hatch==${{ env.HATCH_VERSION }} | |
- name: Run pydocstyle | |
run: hatch run code-quality:docstrings | |
scan-for-secrets: | |
name: Scan for secrets | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install gitleaks | |
run: wget -O - https://github.com/gitleaks/gitleaks/releases/download/v8.16.1/gitleaks_8.16.1_linux_x64.tar.gz | tar -xz | |
- run: ./gitleaks detect --log-opts "${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}" | |
if: github.event_name == 'pull_request' | |
- run: ./gitleaks detect --log-opts "${{ github.event.before }}..${{ github.event.after }}" | |
if: github.event_name == 'push' | |
tests: | |
name: Tests | |
runs-on: ubuntu-latest | |
env: | |
API_KEY: "not-a-real-api-key" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install Hatch | |
run: pip install hatch==${{ env.HATCH_VERSION }} | |
- name: Run unit tests | |
run: hatch run test:unit-with-cov | |
- name: Coverage comment | |
if: github.event_name == 'push' || github.event_name == 'pull_request' | |
id: coverage_comment | |
uses: py-cov-action/python-coverage-comment-action@e6ee17f632217eae267a13fbeb4389dce5dc4a26 | |
with: | |
GITHUB_TOKEN: ${{ github.token }} |