Skip to content

ci: bump readmeio/rdme from 8 to 10 in the ci-updates group #1211

ci: bump readmeio/rdme from 8 to 10 in the ci-updates group

ci: bump readmeio/rdme from 8 to 10 in the ci-updates group #1211

name: CI
on:
pull_request:
env:
HATCH_VERSION: "v1.14.0" # keep in sync with deploy.yml
permissions:
pull-requests: write
contents: write
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
with:
# for coverage comment action
fetch-depth: 1000
- 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
id: coverage_comment
uses: py-cov-action/python-coverage-comment-action@970a227e0c16ef4589a99a9970ab0ceb8c53059a
with:
GITHUB_TOKEN: ${{ github.token }}