Skip to content

Add tests for CLI pyproject initialization #46

Add tests for CLI pyproject initialization

Add tests for CLI pyproject initialization #46

Workflow file for this run

name: "Tests"
on:
push:
branches:
- master
pull_request:
branches:
- master
defaults:
run:
shell: bash
permissions:
contents: read
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
tests:
# adapted from: https://github.com/nedbat/coveragepy/blob/master/.github/workflows/coverage.yml
name: "os: ${{ matrix.os }}, python: ${{ matrix.python-version }}"
runs-on: "${{ matrix.os }}-latest"
env:
MATRIX_ID: "${{ matrix.os }}-${{ matrix.python-version }}"
PIP_DISABLE_PIP_VERSION_CHECK: "1"
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os:
- ubuntu
- macos
- windows
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "pypy3.10"
steps:
- name: "Check out the repo"
uses: actions/checkout@v4
with:
persist-credentials: false
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"
allow-prereleases: true
- name: "Install dependencies"
run: |
set -xe
python -m pip install --upgrade pip
python -m pip install -r pkgaux/base_requirements.txt
- name: "Test session"
run: nox -s prepare test-${{ matrix.python-version }}
- name: "Upload coverage data"
uses: actions/upload-artifact@v4
with:
name: coverage-${{ env.MATRIX_ID }}
path: tmp/.coverage.*
include-hidden-files: true
report:
name: Report
needs:
- tests
runs-on: ubuntu-latest
steps:
- name: "Check out the repo"
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: "Install dependencies"
run: |
set -xe
python -m pip install --upgrade pip
python -m pip install -r pkgaux/base_requirements.txt
- name: "Download coverage data"
uses: actions/download-artifact@v4
with:
pattern: coverage-*
merge-multiple: true
path: tmp/
- name: Generate report
run: |
ls -la tmp/
nox -s report
- name: "Upload HTML report"
uses: actions/upload-artifact@v4
with:
name: html_report
path: reports/htmlcov
include-hidden-files: true