-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Test PyPRIMA | ||
Check failure Code scanning / check-spelling Check File Path Error test
pyprima is not a recognized word. (check-file-path)
|
||
|
||
on: | ||
# Trigger the workflow on push or pull request | ||
#push: | ||
pull_request: # DANGEROUS! MUST be disabled for self-hosted runners! | ||
# Trigger the workflow by cron. The default time zone of GitHub Actions is UTC. | ||
schedule: | ||
- cron: '0 16 4-31/4 * *' | ||
# Trigger the workflow manually | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
|
||
test: | ||
name: Run PyPRIMA tests | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
with: | ||
submodules: recursive | ||
# ssh-key: ${{ secrets.SSH_PRIVATE_KEY_ACT }} # This forces checkout to use SSH, not HTTPS | ||
# As of 230425, checkout with ssh fails frequently on Windows runners. | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.12" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install numpy pytest scipy pytest-cov | ||
Check failure Code scanning / check-spelling Unrecognized Spelling Error test
cov is not a recognized word. (unrecognized-spelling)
|
||
- name: Conduct the test | ||
run: | | ||
cd pyprima | ||
Check failure Code scanning / check-spelling Unrecognized Spelling Error test
pyprima is not a recognized word. (unrecognized-spelling)
|
||
python -m pip install . | ||
pytest --cov=src --cov-report=html tests/ | ||
PRIMA_DEBUGGING=1 pytest --cov=src --cov-append tests/test_end_to_end.py | ||
Check failure Code scanning / check-spelling Unrecognized Spelling Error test
cov is not a recognized word. (unrecognized-spelling)
Check failure Code scanning / check-spelling Unrecognized Spelling Error test
cov is not a recognized word. (unrecognized-spelling)
|
||
Check failure Code scanning / check-spelling Unrecognized Spelling Error test
cov is not a recognized word. (unrecognized-spelling)
Check failure Code scanning / check-spelling Unrecognized Spelling Error test
cov is not a recognized word. (unrecognized-spelling)
|
||
- name: Store artifacts | ||
uses: actions/[email protected] | ||
if: always() # Always run even if the workflow is canceled manually or due to overtime. | ||
# Note that `$TEST_DIR` does not work on Windows, where its equivalent is `$env:TEST_DIR`. | ||
# In the following, we enquire `$TEST_DIR` by using the `env` context, which is platform independent. | ||
with: | ||
path: ${{ env.TEST_DIR }}/pyprima/htmlcov/* |