Skip to content

Instantly share code, notes, and snippets.

@cosimo
Created March 30, 2023 15:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cosimo/d3abb18d1d312a940755500c4670b750 to your computer and use it in GitHub Desktop.
Save cosimo/d3abb18d1d312a940755500c4670b750 to your computer and use it in GitHub Desktop.
GHA ci workflow for Python 3 projects based on Poetry
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
ci:
strategy:
fail-fast: true
matrix:
python-version: ["3.8"]
poetry-version: ["1.1.15"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Setup poetry
uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: ${{ matrix.poetry-version }}
- name: Install dependencies and run tests
run: |
poetry install
poetry run pytest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment