Wc/usgs display #187
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: Pytests | |
on: pull_request | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: [3.9] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
fetch-depth: 1 | |
- uses: nanasess/setup-chromedriver@v2 | |
- name: Install Chrome Driver | |
run: | | |
export DISPLAY=:99 | |
chromedriver --url-base=/wd/hub & | |
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional | |
- name: Install Conda environment from environment.yml | |
uses: mamba-org/setup-micromamba@main | |
with: | |
environment-file: environment.yml | |
cache-environment: true | |
init-shell: bash | |
- name: Install Package | |
shell: bash -l {0} | |
run: | | |
python -m pip install .[dev] | |
- name: Run Pytest | |
shell: bash -l {0} | |
run: | | |
python -m pytest -v --disable-warnings --cov=./ --cov-report=xml:coverage.xml | |
- name: Upload Coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
flags: unittests | |
env_vars: OS,PYTHON | |
name: codecov-umbrella | |
fail_ci_if_error: false | |
verbose: true |