generated from eWaterCycle/ewatercycle-leakybucket
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from Daafip/Daafip-feature-testing
Create automated test.yml
- Loading branch information
Showing
1 changed file
with
35 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,35 @@ | ||
# based on https://github.com/eWaterCycle/ewatercycle-hype/blob/main/.github/workflows/test.yml | ||
name: Python package | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.10"] | ||
fail-fast: false | ||
name: Run tests in mamba environment ${{ matrix.python-version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Download mamba environment.yml | ||
run: | ||
wget https://raw.githubusercontent.com/eWaterCycle/ewatercycle/main/environment.yml | ||
- uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
environment-file: environment.yml | ||
cache-environment: true | ||
init-shell: bash | ||
- name: Install dependencies | ||
shell: micromamba-shell {0} | ||
run: | | ||
pip3 install pytest | ||
pip3 install -e . | ||
- name: Test with pytest | ||
run: pytest | ||
shell: micromamba-shell {0} |