Skip to content

Merge pull request #13 from 62442katieb/fixed-nbs #25

Merge pull request #13 from 62442katieb/fixed-nbs

Merge pull request #13 from 62442katieb/fixed-nbs #25

Workflow file for this run

name: "Run Tests"
on:
push:
branches:
- "master"
pull_request:
branches:
- '*'
concurrency:
group: testing-${{ github.ref }}
cancel-in-progress: true
jobs:
# Determine if tests should be run based on commit message.
check_skip:
name: Determine if CI should be skipped
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.result_step.outputs.ci-skip }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- id: result_step
uses: mstachniuk/ci-skip@master
with:
commit-filter: '[skip ci];[ci skip];[skip github]'
commit-filter-separator: ';'
run_unit_tests:
name: Unit tests
needs: check_skip
if: ${{ needs.check_skip.outputs.skip == 'false' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
python-version: ["3.7", "3.8", "3.9", "3.10"]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- name: 'Set up python'
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: 'Install IDConn'
shell: bash {0}
run: pip install -e .[tests]
- name: 'Run tests'
shell: bash {0}
run: py.test --cov-append --cov-report=xml --cov=idconn idconn
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: unit_${{ matrix.os }}_${{ matrix.python-version }}
path: coverage.xml
if: success()
upload_to_codecov:
name: Upload coverage
needs: [run_unit_tests]
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download artifacts
uses: actions/download-artifact@v2
- name: Upload to CodeCov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true