oct2py #545
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: oct2py | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
# Run weekly | |
# * is a special character in YAML so you have to quote this string | |
- cron: "0 0 * * 0" | |
concurrency: | |
group: tests-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- name: Install Octave | |
run: | | |
sudo apt-get update | |
sudo apt-get install -qq octave octave-signal liboctave-dev | |
- name: Generate coverage report | |
run: | | |
pip install hatch; xvfb-run --auto-servernum hatch run cover:test | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
flags: unittests | |
name: codecov-umbrella | |
fail_ci_if_error: true | |
check_release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
docs: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- run: hatch run docs:build | |
test_lint: | |
name: Test Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- name: Run Linters | |
run: | | |
hatch run typing:test | |
hatch run lint:build | |
pipx run interrogate -v . | |
pipx run doc8 --max-line-length=200 docs/source *.md | |
check_links: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1 | |
tests_check: # This job does nothing and is only used for the branch protection | |
if: always() | |
needs: | |
- build | |
- test_lint | |
- docs | |
- check_links | |
- check_release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} |