Skip to content

build-test GitHub Actions #1

build-test GitHub Actions

build-test GitHub Actions #1

Workflow file for this run

name: build-test
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, 3.10]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: pip install poetry
- name: Configure Poetry
run: poetry config virtualenvs.in-project true
- name: Lock dependencies
run: poetry lock
- name: Build package
run: poetry build
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.10
- name: Install Poetry
run: pip install poetry
- name: Configure Poetry
run: poetry config virtualenvs.in-project true
- name: Lock dependencies
run: poetry lock
- name: Install dependencies
run: poetry install --with dev
- name: Run tests
run: poetry run pytest