Skip to content

docs: Adds FOSSA license badge #112

docs: Adds FOSSA license badge

docs: Adds FOSSA license badge #112

Workflow file for this run

name: tests
on:
push:
branches: main
pull_request:
branches: main
jobs:
pytest:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python: [3.9]
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
architecture: x64
- name: Cache python modules
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-python-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }}-test
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[test]"
- name: Run unittests
run: pytest --cov=torchcam --cov-report xml tests/
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
fail_ci_if_error: true
- name: Backup upload
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${CODECOV_TOKEN} -f ./coverage.xml --flags unittests --verbose
headers:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- name: Check the headers
uses: frgfm/validate-python-headers@main
with:
license: 'Apache-2.0'
owner: 'François-Guillaume Fernandez'
starting-year: 2020
folders: 'torchcam,scripts,demo,docs,.github'
ignores: 'version.py,__init__.py'