Skip to content

Commit

Permalink
chore(ci): configure ci with poetry & matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
gciatto committed Mar 25, 2024
1 parent d60f6d8 commit 199e12e
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI/CD
on:
push:
branches-ignore:
- 'dependabot/**'
paths-ignore:
- '.gitignore'
- '.mergify.yml'
- 'CHANGELOG.md'
- 'LICENSE'
- 'README.md'
- 'renovate.json'
pull_request:
workflow_dispatch:
jobs:
test:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
python-version:
- '3.10'
- '3.11'
runs-on: ${{ matrix.os }}
name: Run tests on Python ${{ matrix.python-version }}, on ${{ matrix.os }}
timeout-minutes: 45
concurrency:
group: ${{ github.workflow }}-run-unit-tests-${{ matrix.python-version }}-${{ matrix.os }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
steps:
- name: Install poetry
run: pip install poetry

- name: Checkout code
uses: actions/checkout@v4

- name: Override Python version for Poetry
run: sed -i -e 's#^python\s*=.*$#python = "^${{ matrix.python-version }}"#g' pyproject.toml

- name: Restore Python dependencies
run: poetry lock && poetry install

- name: Test
run: .venv/bin/python -m unittest discover -v -s tests -t .

0 comments on commit 199e12e

Please sign in to comment.