-
Notifications
You must be signed in to change notification settings - Fork 4
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
Showing
1 changed file
with
56 additions
and
56 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 |
---|---|---|
|
@@ -10,18 +10,18 @@ jobs: | |
pre-commit-checks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Setup code repository | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 1 | ||
- name: Setup Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: 3.12 | ||
- | ||
name: pre-commit | ||
uses: pre-commit/[email protected] | ||
- | ||
name: Setup code repository | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 1 | ||
- name: Setup Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: 3.12 | ||
- | ||
name: pre-commit | ||
uses: pre-commit/[email protected] | ||
|
||
tests: | ||
needs: pre-commit-checks | ||
|
@@ -31,47 +31,47 @@ jobs: | |
os: [ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- | ||
name: Setup code repository | ||
uses: [email protected] | ||
with: | ||
fetch-depth: 1 | ||
- | ||
name: Setup uv | ||
uses: astral-sh/[email protected] | ||
with: | ||
enable-cache: true | ||
- | ||
name: Setup Python ${{ matrix.python-version }} | ||
run: | | ||
uv python install ${{ matrix.python-version }} | ||
uv sync --all-extras --dev | ||
- | ||
name: Login to Canfar | ||
env: | ||
CANFAR_BASEURL: ${{ secrets.CANFAR_BASEURL }} | ||
CANFAR_USERNAME: ${{ secrets.CANFAR_USERNAME }} | ||
CANFAR_PASSWORD: ${{ secrets.CANFAR_PASSWORD }} | ||
run: | | ||
echo "machine ${CANFAR_BASEURL}\n login ${CANFAR_USERNAME}\n password ${CANFAR_PASSWORD}" > ~/.netrc | ||
uv run cadc-get-cert --days-valid 1 --netrc-file ~/.netrc | ||
- | ||
name: Run tests | ||
run: | | ||
uv run pytest tests --cov --cov-report=xml --junitxml=junit.xml -o junit_family=legacy | ||
- | ||
name: Upload coverage to Codecov | ||
env: | ||
CODECOV_TOKEN: ${{ env.CODECOV_TOKEN }} | ||
uses: codecov/[email protected] | ||
with: | ||
fail_ci_if_error: true # Fail the CI if an error occurs during the upload | ||
token: ${{ env.CODECOV_TOKEN }} | ||
flags: ${{ matrix.python-version }} | ||
verbose: true # optional (default = false) | ||
- | ||
name: Upload test results to Codecov | ||
if: ${{ !cancelled() }} | ||
uses: codecov/test-results-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
- | ||
name: Setup code repository | ||
uses: [email protected] | ||
with: | ||
fetch-depth: 1 | ||
- | ||
name: Setup uv | ||
uses: astral-sh/[email protected] | ||
with: | ||
enable-cache: true | ||
- | ||
name: Setup Python ${{ matrix.python-version }} | ||
run: | | ||
uv python install ${{ matrix.python-version }} | ||
uv sync --all-extras --dev | ||
- | ||
name: Login to Canfar | ||
env: | ||
CANFAR_BASEURL: ${{ secrets.CANFAR_BASEURL }} | ||
CANFAR_USERNAME: ${{ secrets.CANFAR_USERNAME }} | ||
CANFAR_PASSWORD: ${{ secrets.CANFAR_PASSWORD }} | ||
run: | | ||
echo "machine ${CANFAR_BASEURL}\n login ${CANFAR_USERNAME}\n password ${CANFAR_PASSWORD}" > ~/.netrc | ||
uv run cadc-get-cert --days-valid 1 --netrc-file ~/.netrc | ||
- | ||
name: Run tests | ||
run: | | ||
uv run pytest tests --cov --cov-report=xml --junitxml=junit.xml -o junit_family=legacy | ||
- | ||
name: Upload coverage to Codecov | ||
env: | ||
CODECOV_TOKEN: ${{ env.CODECOV_TOKEN }} | ||
uses: codecov/[email protected] | ||
with: | ||
fail_ci_if_error: true # Fail the CI if an error occurs during the upload | ||
token: ${{ env.CODECOV_TOKEN }} | ||
flags: ${{ matrix.python-version }} | ||
verbose: true # optional (default = false) | ||
- | ||
name: Upload test results to Codecov | ||
if: ${{ !cancelled() }} | ||
uses: codecov/test-results-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |