Skip to content

Commit

Permalink
Update python-test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
juri-debug authored Aug 22, 2024
1 parent 743b7b6 commit 8774e7e
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# This workflow will install Python dependencies, run tests, and build distribution artifacts with Poetry
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: CPM test and test deploy
name: CPM test and build

on:
push:
Expand All @@ -18,17 +18,24 @@ jobs:

steps:
- uses: actions/checkout@v3
name: Checkout code
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Configure Poetry
run: |
poetry config virtualenvs.create false
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install scikit-learn pandas numpy pingouin typer pytest pytest-cov
poetry install
- name: Test with pytest
run: |
PYTHONPATH=./ pytest ./tests --cov=./cpm_python --full-trace
poetry run pytest ./tests --cov=./cpm_python --full-trace
build:
name: Build distribution
runs-on: ubuntu-latest
Expand All @@ -42,9 +49,17 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install pypa/build
run: pip install build pbr wheel
- name: Build a binary wheel and a source tarball
run: python -m build -n --sdist --wheel --outdir dist/
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Configure Poetry
run: |
poetry config virtualenvs.create false # Use the system environment
- name: Install dependencies
run: |
poetry install
- name: Build distribution
run: |
poetry build --no-interaction
- name: List built artifacts
run: ls -al dist/

0 comments on commit 8774e7e

Please sign in to comment.