[Snyk] Fix for 4 vulnerabilities #239
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: test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
# Runs the tests on combinations of the supported python/os matrix. | |
test_code: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: [3.7, 3.8] | |
exclude: | |
# Currently (0.4.2) EQcorrscan does not support Python 3.8 on Windows | |
- os: windows-latest | |
python-version: 3.8 | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup conda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
miniconda-version: 'latest' | |
python-version: ${{ matrix.python-version }} | |
activate-environment: rteqcorrscan-test | |
environment-file: .github/test_conda_env.yml | |
condarc-file: .github/test_condarc.yml | |
- name: install rt-eqcorrscan | |
shell: bash -l {0} | |
run: | | |
pip install -e . | |
- name: print package info | |
shell: bash -l {0} | |
run: | | |
conda info -a | |
conda list | |
- name: run test suite | |
shell: bash -l {0} | |
run: | | |
export CI="true" | |
py.test -n 2 --dist=loadscope --cov-report=xml | |
# - name: run streamer tests | |
# shell: bash -l {0} | |
# run: | | |
# export CI="true" | |
# py.test tests/streaming_tests -v --cov-report=xml | |
- name: upload coverage | |
uses: codecov/codecov-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
flags: unittests | |
name: codecov-umbrella | |
yml: ./codecov.yml | |
fail_ci_if_error: true | |
# This is a very useful step for debugging, it allows you to ssh into the CI | |
# machine (https://github.com/marketplace/actions/debugging-with-tmate). | |
# Make sure to open the log before the job starts else you cant see the tmate | |
# url. See https://github.com/mxschmitt/action-tmate/issues/1. | |
# Also, the CI machine will close on a non-zero exit code (annoying). This can | |
# be overcome by coalescing the null command like so: | |
# $ some-command-that-can-fail || : | |
# | |
#- name: Setup tmate session | |
# uses: mxschmitt/action-tmate@v1 |