Skip to content

Tests

Tests #1562

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
- cron: "0 4 * * *"
jobs:
pytest:
name: Unit tests
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
exclude:
- os: macos-latest
python-version: '3.8'
- os: macos-latest
python-version: '3.9'
- os: macos-latest
python-version: '3.11'
- os: windows-latest
python-version: '3.8'
- os: windows-latest
python-version: '3.9'
- os: windows-latest
python-version: '3.10'
- os: windows-latest
python-version: '3.11'
fail-fast: false
runs-on: ${{ matrix.os }}
env:
OS: ${{ matrix.os }}
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install tox
run: pip install tox
- name: Run unit tests
run: tox -e py
- name: Upload coverage reports to Codecov
run: |
OS_LOWERCASE=$(echo $RUNNER_OS | tr '[:upper:]' '[:lower:]')
curl -Os https://uploader.codecov.io/latest/${OS_LOWERCASE}/codecov
chmod +x codecov
./codecov
cli:
name: CLI smoke tests
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install project
run: pip install .
- name: Test transforms CLI tool
run: tiotr --help
- name: Test info CLI tool
run: tiohd --help