Skip to content

Commit

Permalink
fix Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
richardiw committed Nov 19, 2023
1 parent a73a070 commit ca6c349
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
35 changes: 17 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,54 +6,53 @@ jobs:
test:
strategy:
matrix:
python-version: [ "3.7","3.8","3.9","3.10" ]
python-version: [ "3.7","3.8","3.9","3.10", "3.11" ]
runs-on: ubuntu-latest
steps:
#----------------------------------------------
# check-out repo and set-up python
#----------------------------------------------
- name: Check out repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up python v ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true

- name: Install poetry
run: |
python -m pip install poetry
- name: Configure poetry
run: |
python -m poetry config virtualenvs.in-project true
#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
run: |
python -m poetry install --no-interaction --no-root
#----------------------------------------------
# install your root project, if required
#----------------------------------------------
- name: Install library
run: poetry install --no-interaction

#----------------------------------------------
# run test suite
#----------------------------------------------
- name: Run tests
run: |
source .venv/bin/activate
pytest faker_biology/tests/
#coverage report
python -m poetry run python -m pytest -sxv faker_biology/tests
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "faker-biology"
version = "0.6.1"
version = "0.6.2"
description = "Fake data from biology"
authors = ["Richard Adams <[email protected]>"]
license = "Apache 2"
Expand Down

0 comments on commit ca6c349

Please sign in to comment.