Feature/attribute_to_image #60
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: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
types: [ready_for_review, reopened] | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: 'Branch to run on' | |
required: true | |
default: 'main' | |
concurrency: | |
group: test-${{ github.head_ref }} | |
cancel-in-progress: true | |
env: | |
PYTHONUNBUFFERED: "1" | |
FORCE_COLOR: "1" | |
jobs: | |
run: | |
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ['3.11'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Hatch | |
run: pip install --upgrade hatch | |
- name: Run tests | |
run: hatch run test:cov | |
- name: Prepare artifact | |
run: | | |
mkdir artifact | |
cp -r tests/.profiles artifact/.profiles | |
cp -r tests/.coverage artifact/.coverage | |
- name: Upload performance & coverage report artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage-profiling | |
path: artifact | |
if-no-files-found: error | |
- name: Run linting | |
run: hatch run lint:style | |
- name: Run type-checking | |
run: hatch run lint:typing |