Merge pull request #1 from camsai/chore/2024-12-12/initial-notebooks #5
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
# Work in progress, needs `camsai/actions` repository to be present | |
name: Continuous Testing and Publication | |
on: [push] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
run-py-linter: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python-version: | |
- 3.10.x | |
steps: | |
- name: Checkout this repository | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Checkout actions repository | |
uses: actions/checkout@v4 | |
with: | |
repository: camsai/actions | |
token: ${{ secrets.GITHUB_TOKEN }} | |
path: actions | |
- name: Run ruff linter | |
uses: ./actions/py/lint | |
with: | |
python-version: ${{ matrix.python-version }} | |
run-py-tests: | |
needs: run-py-linter | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python-version: | |
- 3.10.x | |
- 3.11.x | |
steps: | |
- name: Checkout this repository | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Checkout actions repository | |
uses: actions/checkout@v4 | |
with: | |
repository: camsai/actions | |
token: ${{ secrets.GITHUB_TOKEN }} | |
path: actions | |
- name: Run python unit tests | |
uses: ./actions/py/pytest | |
with: | |
python-version: ${{ matrix.python-version }} | |
unit-test-directory: tests/ | |
publish-py-package: | |
needs: | |
- run-py-tests | |
- run-py-linter | |
runs-on: ubuntu-latest | |
if: (github.ref_name == 'main') | |
steps: | |
- name: Checkout this repository | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
- name: Checkout actions repository | |
uses: actions/checkout@v4 | |
with: | |
repository: camsai/actions | |
token: ${{ secrets.GITHUB_TOKEN }} | |
path: actions | |
- name: Publish python release | |
uses: ./actions/py/publish | |
with: | |
python-version: 3.10.12 | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
pypi-api-token: ${{ secrets.PYPI_API_TOKEN }} |