Skip to content

Continuous Integration #83

Continuous Integration

Continuous Integration #83

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- main
tags:
- "*"
pull_request:
schedule:
- cron: '30 2 * * 1,4' # Every Monday and Thursday @ 2h30am UTC
jobs:
test:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
strategy:
fail-fast: false
matrix:
os: ["ubuntu-22.04"]
python-version: ["3.11", "3.12", "3.13"]
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Checkout source
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Create virtual environment
run: |
python -m venv .venv
source .venv/bin/activate
pip install -U pip
- name: Install saopicc-schemas
run: |
source .venv/bin/activate
pip install .[testing]
- name: Test saopicc-schemas
run: |
source .venv/bin/activate
py.test -s -vvv tests/ -Werror
# - name: Debug with tmate on failure
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
deploy:
needs: [test]
runs-on: ubuntu-latest
environment:
name: pypi
url: https:/pypi.org/p/saopicc-schemas
permissions:
id-token: write
steps:
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: 3.12
- name: Checkout source
uses: actions/checkout@v6
with:
fetch-depth: 1
- name: Build distributions
run: |
pip install -U pip build
python -m build --sdist --wheel
- name: Publish distribution 📦 to PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1