Skip to content

Commit

Permalink
Ci/test and release (#396)
Browse files Browse the repository at this point in the history
* First pass at re-enabling tests in ci

* Update to newer poetry gh action, tweak cache setting

* Fix missing }

* Fix incorrect gh action repository name

* Disable venv cache

* Test out doing flake8 linting with poetry

* Revert flake8 linting to separate run for nicer reporting

* Test reusable python matrix

* Revert reuse test, sync up steps between pip/poetry

* Remove missing dependency

* force linting pass before running expensive install/pytest steps
  • Loading branch information
jwhite242 committed May 17, 2022
1 parent ee9de62 commit 7c5c16e
Showing 1 changed file with 39 additions and 5 deletions.
44 changes: 39 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name: ci
on:
push:
branches: main # proposed addition
branches: [main, develop] # proposed addition
pull_request:

jobs:
Expand All @@ -24,22 +24,56 @@ jobs:
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
test-install:
needs: [ linting ]
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
name: Python ${{ matrix.python-version }} with pip

steps:
- uses: actions/checkout@v2
- name: Check out
uses: actions/checkout@v2

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Test install in editable
architecture: x64

- name: Test editable install
run: |
python -m pip install --upgrade pip
python -m pip install -e .
tests:
needs: [ linting ]
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
name: Python ${{ matrix.python-version }} with poetry

steps:
- name: Check out
uses: actions/checkout@v2

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Install Dependencies using Poetry
run: poetry install

- name: Run pytest
run: poetry run pytest

0 comments on commit 7c5c16e

Please sign in to comment.