Skip to content

Check wheel build in test #150

Check wheel build in test

Check wheel build in test #150

Workflow file for this run

name: Tests
on:
pull_request:
push:
branches: [main]
jobs:
pre-commit:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- uses: pre-commit/[email protected]
test:
name: Unit tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements/CI-tests-pip/requirements.txt
- name: Test with pytest
run: |
pytest --cov=tstrait --cov-report=xml --cov-branch -n 0 tests
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: Delete coverage
run: |
rm .coverage
dist:
name: Distribution
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"]
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install build twine
- name: Build sdist and wheel
python -m build
- name: Check distribution artefacts
python3 -m twine check dist/*
- name: Install wheel and import
python3 -m pip install dist/*.whl

Check failure on line 80 in .github/workflows/tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/tests.yml

Invalid workflow file

You have an error in your yaml syntax on line 80
python3 -c "import tstrait"