adjust unittest workflow #148
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: Unittest xcube-stac | |
on: | |
push: | |
release: | |
types: [published] | |
jobs: | |
unittest: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout xcube | |
uses: actions/checkout@v4 | |
with: | |
repository: xcube-dev/xcube | |
path: xcube | |
- name: checkout xcube-stac | |
uses: actions/checkout@v4 | |
with: | |
path: xcube-stac | |
- name: Set up MicroMamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: xcube-stac/environment.yml | |
# quick and dirty, will be removed after xcube 1.8 release | |
- name: Install xcube from source | |
shell: bash -l {0} | |
run: | | |
micromamba install -c conda-forge tabulate | |
cd /home/runner/work/xcube-stac/xcube-stac/xcube | |
ls | |
pip install --no-deps . | |
- name: Start xcube server | |
shell: bash -l {0} | |
run: | | |
cd /home/runner/work/xcube-stac/xcube-stac/xcube | |
ls | |
xcube serve -c examples/serve/demo/config.yml & | |
- name: Run unit tests | |
shell: bash -l {0} | |
run: | | |
cd /home/runner/work/xcube-stac/xcube-stac/xcube-stac | |
ls | |
pytest --cov=xcube_stac --cov-report=xml | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
verbose: true | |
token: ${{ secrets.CODECOV_TOKEN }} |