Skip to content

update actions (env, add env to checkout) #34

update actions (env, add env to checkout)

update actions (env, add env to checkout) #34

# This workflow will install Python dependencies, run tests and lint with a
# variety of Python versions
#
# In addition, code coverage is reported to Coveralls
#
# For more information see:
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python package
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE20: true
- name: Install uv
uses: astral-sh/setup-uv@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install the project
run: uv sync --all-extras --dev
# - name: Check code
# run: |
# make check
- name: Run tests and check coverage
run: |
uv run coverage run -m pytest
uv run coverage lcov
- name: Code Coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov