Skip to content

Update test.yml

Update test.yml #37

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Test
on:
- push
- pull_request
defaults:
run:
working-directory: src
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version

Check failure on line 20 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / Test

Invalid workflow file

The workflow is not valid. .github/workflows/test.yml (Line: 20, Col: 9): Unexpected value 'python-version - "3.11" - "3.12"'
- "3.11"
- "3.12"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
cp ../README.md ../LICENSE ./
python -m pip install --upgrade pip setuptools
pip install -e .[ci]
- name: Lint with flake8
run: |
flake8
- name: Test with pytest
run: |
pytest --cov --cov-report term-missing:skip-covered
- name: Upload to Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
COVERALLS_PARALLEL: true
run: |
coveralls --service=github
coveralls:
name: Indicate completion to coveralls.io
needs: test
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
python -m pip install --upgrade coveralls
coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: ''