-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0a9cc47
commit 58009a2
Showing
2 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# 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-20.04 | ||
strategy: | ||
matrix: | ||
python-version: [3.10.12] | ||
|
||
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-20.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/py/unit | ||
|
||
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 }} | ||
publish-tag: 'false' |
File renamed without changes.