Skip to content

Commit

Permalink
Fix the Github Action CI for Python tests (#445)
Browse files Browse the repository at this point in the history
* GH Action on main branch instead of master and develop

* bump actions/upload-artifact@v2 to v4

* install doc requirements from .toml

* bump actions/checkout@v2 --> v4

* bump actions/setup-python@v1 --> v5

* move pip-install-docs back to only run during docs build

* typo 3.8 --> 3.9

* bump codecov/codecov-action@v1 --> v4

* remove platform specification from docs-artifact
  • Loading branch information
remrama authored Oct 9, 2024
1 parent c93ec4b commit a3fa6fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/python_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Python tests

on:
push:
branches: [master, develop]
branches: [main]
pull_request:
branches: [master, develop]
branches: [main]

jobs:
build:
Expand All @@ -20,10 +20,10 @@ jobs:
FORCE_COLOR: true

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -39,20 +39,20 @@ jobs:
- name: Build docs
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == 3.9 }}
run: |
pip install --upgrade sphinx sphinx_bootstrap_theme numpydoc sphinx-copybutton sphinx-panels
pip install .[docs]
make -C docs clean
make -C docs html
- name: Upload doc build artifacts
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == 3.9 }}
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: docs-artifact
path: docs/build/html

- name: Upload coverage report
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == 3.9 }}
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v4
with:
token: c6ed6ca6-a040-4f23-9ebf-8c474c998097
file: ./coverage.xml
2 changes: 1 addition & 1 deletion docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ To inspect these build artifacts, follow these steps:

Screenshot of the GitHub checks dropdown menu

* Click on the check that starts with ``Python tests / build (ubuntu-latest, 3.8)``
* Click on the check that starts with ``Python tests / build (ubuntu-latest, 3.9)``
* Now in the top right corner of the opening window, you will see a small dropdown menu called "Artifacts"

.. figure:: /pictures/github_build_artifacts.png
Expand Down

0 comments on commit a3fa6fb

Please sign in to comment.