Skip to content

Commit

Permalink
Merge pull request #6 from ReproNim/rf-workflow
Browse files Browse the repository at this point in the history
Simplify test workflow a little
  • Loading branch information
yarikoptic authored Oct 13, 2023
2 parents 96baba9 + a26eb9e commit a42fb3a
Show file tree
Hide file tree
Showing 3 changed files with 363 additions and 237 deletions.
37 changes: 24 additions & 13 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ env:
jobs:
pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python:
- '3.10'
# 3.11 needs more work
#- '3.11'
#- '3.12'
steps:
- name: Configure environment
run: |
Expand All @@ -28,33 +35,37 @@ jobs:
with:
fetch-depth: 0

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

- name: Create venv and poetry build
run: |
pwd
ls -l
python3.10 -m venv venv
venv/bin/pip install poetry
venv/bin/poetry config virtualenvs.create false
venv/bin/poetry config virtualenvs.in-project true
venv/bin/poetry env use `which python3`
venv/bin/python --version
venv/bin/poetry --version
venv/bin/poetry install
venv/bin/poetry build
pip install poetry
poetry config virtualenvs.create false
poetry config virtualenvs.in-project true
poetry env use `which python`
python --version
poetry --version
poetry install
poetry build
shell: bash

- name: Setup test DB
run: |
> db/db_dev.sqlite3
venv/bin/poetry run setup_db
poetry run setup_db
shell: bash

- name: Run pytest
run: |
venv/bin/poetry run pytest
poetry run pytest --cov=. --cov-report=xml
shell: bash

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Loading

0 comments on commit a42fb3a

Please sign in to comment.