Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

update build script #56

update build script

update build script #56

Workflow file for this run

name: CI Pipeline
# only on tagged commits or manual trigger or on change to main.yml
on:
push:
# tags:
# - '*'
# paths:
# - .github/workflows/**.yml
branches:
- 18-improved-model-getting-and-examples
- dev
tags:
- '*'
# on push to dev or main branch if tags are pushed
jobs:
Build:
runs-on: ubuntu-latest
strategy:
fail-fast: False
matrix:
python-version: ["3.11"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Clean up disk space
run: |
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
sudo rm -rf /tmp/*
sudo rm -rf /var/tmp/*
df -h
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install hatch
pip install pytest
pip install -r requirements.txt
- name: Hatch build
run: |
hatch build
ls -l dist
- name: Install package and run tests
run: |
pip install dist/*.whl
pytest
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: |
dist
PyPI:
needs: Build
runs-on: ubuntu-latest
permissions:
id-token: write
if: github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/')
environment:
name: pypi
url: https://test.pypi.org/p/poly-lithic
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository-url: https://test.pypi.org/project/poly-lithic/