Add support for optional telemetry recording #430
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Validate code | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
validate_commit_39: | |
name: Validate commit on Python 3.9 | |
runs-on: ubuntu-latest | |
if: ${{ github.ref != 'refs/heads/main' }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9.x' | |
architecture: 'x64' | |
- name: Install Poetry and dependencies | |
uses: SneaksAndData/github-actions/[email protected] | |
with: | |
install_extras: all | |
- name: Unit test | |
run: | | |
set -euxo pipefail | |
poetry run pytest ./tests --doctest-modules --junitxml=junit/test-results.xml --cov=. --cov-report=term-missing:skip-covered | tee pytest-coverage.txt | |
- name: Publish Code Coverage | |
uses: MishaKav/pytest-coverage-comment@main | |
with: | |
pytest-coverage-path: ./pytest-coverage.txt | |
junitxml-path: ./junit/test-results.xml | |
validate_commit_311: | |
name: Validate commit on Python 3.11 | |
runs-on: ubuntu-latest | |
if: ${{ github.ref != 'refs/heads/main' }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11.x' | |
architecture: 'x64' | |
- name: Install Poetry and dependencies | |
uses: SneaksAndData/github-actions/[email protected] | |
with: | |
install_extras: all | |
- name: Unit test | |
run: | | |
set -euxo pipefail | |
poetry run pytest ./tests --doctest-modules --junitxml=junit/test-results.xml --cov=. --cov-report=term-missing:skip-covered | tee pytest-coverage.txt | |
- name: Publish Code Coverage | |
uses: MishaKav/pytest-coverage-comment@main | |
with: | |
pytest-coverage-path: ./pytest-coverage.txt | |
junitxml-path: ./junit/test-results.xml |