ria-toolkit-oss/.riahub/workflows/build-project.yaml

51 lines
1.2 KiB
YAML
Raw Normal View History

name: Build Project
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
project-build-check:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.10', '3.11', '3.12' ]
name: Build Project
steps:
- name: Check out project
uses: actions/checkout@v4
- name: Build project
run: |
poetry build
- name: Set up Python environment
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Create Python virtual environment
run: |
python -m venv .venv
- name: Install project in virtual environment
run: |
source .venv/bin/activate
pip install dist/*.whl
# In the following step, 'pip list' prints out a list of installed dependencies. This is not required for the
# build but useful for debugging.
- name: Check dependency installation
run: |
source .venv/bin/activate
pip check
pip list
- name: Very project import
run: |
source .venv/bin/activate
python -c "import ria_toolkit"