Change to run wwatch3 concurrent with nowcast-green #232
Workflow file for this run
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: pytest-with-coverage | |
on: | |
push: | |
branches: ['*'] | |
jobs: | |
pytest-with-coverage: | |
permissions: | |
contents: read | |
pull-requests: write | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [ '3.11' ] | |
runs-on: 'ubuntu-latest' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Conda environment with Micromamba | |
uses: mamba-org/setup-micromamba@db1df3ba9e07ea86f759e98b575c002747e9e757 | |
with: | |
environment-file: envs/environment-test.yaml | |
environment-name: salishsea-nowcast-test | |
# environment caching does not play nicely with --editable installed packages | |
cache-environment: false | |
cache-downloads: true | |
# persist downloads cache for 1 day | |
cache-downloads-key: downloads-${{ steps.date.outputs.date }} | |
create-args: >- | |
python=${{ inputs.python-version }} | |
- name: Install editable-mode dependency packages | |
shell: bash -l {0} | |
run: | | |
python3 -m pip install --src $GITHUB_WORKSPACE/../vcs_pkgs/ --editable git+https://github.com/43ravens/NEMO_Nowcast.git#egg=NEMO_Nowcast | |
python3 -m pip install --src $GITHUB_WORKSPACE/../vcs_pkgs/ --editable git+https://github.com/UBC-MOAD/moad_tools#egg=moad_tools | |
python3 -m pip install --src $GITHUB_WORKSPACE/../vcs_pkgs/ --editable git+https://github.com/UBC-MOAD/Reshapr#egg=Reshapr | |
python3 -m pip install --src $GITHUB_WORKSPACE/../vcs_pkgs/ --editable git+https://github.com/SalishSeaCast/NEMO-Cmd.git#egg=NEMO-Cmd | |
python3 -m pip install --src $GITHUB_WORKSPACE/../vcs_pkgs/ --editable git+https://github.com/SalishSeaCast/SalishSeaCmd.git#egg=SalishSeaCmd | |
python3 -m pip install --src $GITHUB_WORKSPACE/../vcs_pkgs/ --editable "git+https://github.com/SalishSeaCast/tools#egg=SalishSeaTools&subdirectory=SalishSeaTools" | |
python3 -m pip install --src $GITHUB_WORKSPACE/../vcs_pkgs/ --editable git+https://github.com/SalishSeaCast/FVCOM-Cmd.git#egg=FVCOM-Cmd | |
# OPPTools is a private GitLab repo, so an access token is required | |
python3 -m pip install --src $GITHUB_WORKSPACE/../vcs_pkgs/ --editable git+https://oauth2:${{ secrets.GITLAB_ACCESS_TOKEN }}@gitlab.com/mdunphy/OPPTools.git@6c784a4dc44dd9030aafe9a8519e5ae0b6cc3183#egg=OPPTools | |
python3 -m pip install --editable $GITHUB_WORKSPACE | |
- name: pytest package with coverage | |
shell: bash -l {0} | |
run: | | |
pytest --cov=$GITHUB_WORKSPACE --cov-report=xml | |
- name: Upload coverage report to Codecov | |
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d | |
with: | |
file: ./coverage.xml | |
flags: unittests |