Merge pull request #59 from lgtm-migrator/codeql #120
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: Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- "*" | |
jobs: | |
run: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
py_ver: ["3.8", "3.9"] | |
env: | |
OS: ${{ matrix.os }} | |
PYTHON: ${{ matrix.py_ver }} | |
steps: | |
- uses: actions/checkout@master | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
python-version: ${{ matrix.py_ver }} | |
environment-file: environment.yaml | |
activate-environment: sc | |
- name: Conda info | |
shell: bash -l {0} | |
run: | | |
conda info --all | |
conda list | |
- name: Installing souschef | |
shell: bash -l {0} | |
run: | | |
python -m pip install -e . | |
- name: Running tests | |
shell: bash -l {0} | |
run: | | |
pytest tests \ | |
-vv \ | |
-n auto \ | |
--color=yes \ | |
--cov=./ \ | |
--cov-append \ | |
--cov-report html:coverage-html \ | |
--cov-report xml:coverage.xml \ | |
--cov-config=.coveragerc \ | |
--junit-xml=py${{ matrix.py_ver }}.xml \ | |
--junit-prefix=py${{ matrix.py_ver }} | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
files: ./coverage.xml | |
directory: . | |
flags: unittests | |
fail_ci_if_error: true |