Updated for modular RC. #20
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: Run tests | |
on: | |
push: | |
paths: ['**.py', '**.yml'] | |
pull_request: | |
types: [opened, synchronize, reopened] | |
paths: ['**.py'] | |
workflow_dispatch: | |
inputs: | |
triggeredBy: | |
description: Name of team member who is manually triggering this workflow | |
required: true | |
defaults: | |
run: | |
shell: bash | |
env: | |
LANG: en_US.utf-8 | |
LC_ALL: en_US.utf-8 | |
POETRY_VERSION: 1.2.2 | |
jobs: | |
run-tests: | |
strategy: | |
matrix: | |
os: [ubuntu-22.04] | |
python: ['3.10', '3.11'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" | |
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
#---------------------------------------------- | |
# ----- install & configure poetry ----- | |
#---------------------------------------------- | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: ${{ env.POETRY_VERSION }} | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
#---------------------------------------------- | |
# install your root project, and run tests. | |
#---------------------------------------------- | |
- name: Install library and run tests | |
run: | | |
poetry install --no-interaction | |
poetry add --group dev pytest-github-actions-annotate-failures | |
poetry run pytest --cov=src tests/ |