hotfix: update aliases to overwrite any previous ones #293
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: Lint, test + build docs | |
on: [push] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Document branch | |
run: echo ${{ github.ref_name }} | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Configure Git user | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e .[tests] | |
- name: Lint | |
run: ruff check --output-format=github network_wrangler | |
- name: Run tests | |
run: | | |
pytest --junitxml=pytest.xml --cov-report "xml:coverage.xml" --benchmark-save=benchmark --benchmark-json=benchmark.json | |
- name: Build docs | |
run: | | |
mike deploy --push ${{ github.ref_name }} | |
- name: Update latest docs | |
if: github.ref == 'refs/heads/main' | |
run: | | |
mike alias ${{ github.ref_name }} latest --update-aliases --push | |
- name: Store benchmark result | |
uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
tool: 'pytest' | |
output-file-path: benchmark.json | |
alert-threshold: '125%' | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
comment-on-alert: true | |
summary-always: true | |
- name: Pytest coverage comment | |
if: github.event_name == 'pull_request' | |
uses: MishaKav/pytest-coverage-comment@main | |
with: | |
pytest-xml-coverage-path: coverage.xml | |
junitxml-path: pytest.xml |