Skip to content

Commit

Permalink
separate test and doc workflows, run tests on matrix of python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
cklamann committed Aug 12, 2024
1 parent 08999ec commit de42252
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ name: Starling

on:
push:
branches: [ "main" ]
branches: [ "main", "release-0.1.4" ]
pull_request:
branches: [ "main" ]

jobs:
build:
test:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [ '3.9', '3.10', '3.11', '3.12' ]
steps:
- uses: actions/checkout@v3
- name: Install Poetry
Expand All @@ -19,7 +21,7 @@ jobs:
uses: snok/install-poetry@v1
- uses: actions/setup-python@v4
with:
python-version: '3.9'
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install project
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
Expand All @@ -31,6 +33,23 @@ jobs:
- name: Pytest
run: |
poetry run pytest
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Poetry
with:
virtualenvs-create: true
virtualenvs-in-project: true
uses: snok/install-poetry@v1
- uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'poetry'
- name: Install project
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --with docs,dev --no-interaction
- name: Build documentation
run: |
mkdir gh-pages
Expand Down

0 comments on commit de42252

Please sign in to comment.