Skip to content

Merge pull request #53 from lan496/dependabot/github_actions/actions/… #117

Merge pull request #53 from lan496/dependabot/github_actions/actions/…

Merge pull request #53 from lan496/dependabot/github_actions/actions/… #117

Workflow file for this run

name: testing
on:
push:
branches: [master, develop]
pull_request:
branches: [master]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# https://github.com/actions/cache/blob/main/examples.md#python---pip
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
- name: Install
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
- name: Test with pytest
run: |
python -m pytest -v --cov=hsnf --cov-config=setup.cfg --cov-report=xml tests/
- name: Upload coverage to Codecov
if: matrix.python-version == '3.9'
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
fail_ci_if_error: false