feat: add yield table for tree type Weide #225
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: 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 . |