Skip to content

correct dgz from 178 to 203 #237

correct dgz from 178 to 203

correct dgz from 178 to 203 #237

Workflow file for this run

name: Test
on:
pull_request:
branches:
- main
jobs:
test:
name: Test
strategy:
matrix:
python: ["3.8", "3.9", "3.12"]
os: [ubuntu-latest, macOS-latest]
runs-on: ${{ matrix.os }}
steps:
# Check-out repo
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
# Install poetry
- name: Install poetry
run: pipx install poetry==1.8.2
# Set-up python with cache
- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
cache: "poetry"
# Install requirements
- name: Install requirements
run: poetry install
# Run linters
- name: Run linters
run: |
set -o pipefail
poetry run pre-commit run --all-files
# Run unit tests
- name: Run tests
run: |
set -o pipefail
poetry run pytest -- --cov-report xml
# Add pytest coverage report to PR
- name: Pytest coverage comment
if: ${{ success() && github.event_name == 'pull_request' }}
id: coverageComment
uses: MishaKav/pytest-coverage-comment@main
with:
title: Coverage Report
pytest-xml-coverage-path: coverage.xml
# Build package
- name: Build package
run: poetry build
# Build docker image
- name: Build docker image
# Docker is not present on the macOS runner
if: matrix.os == 'ubuntu-latest'
run: docker build .