Skip to content

Bump github/codeql-action from 4.31.6 to 4.31.7 #40

Bump github/codeql-action from 4.31.6 to 4.31.7

Bump github/codeql-action from 4.31.6 to 4.31.7 #40

Workflow file for this run

name: Build, test, & publish
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- major-release
release:
types:
- published
permissions: read-all
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Set up Python 3.13
uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548
with:
python-version: "3.13"
cache: pip
- name: Install uv
uses: install-pinned/uv@aa380d2c49f39e53fe6f5635484bb766098ba8b4
- name: Install dependencies
run: |
uv pip install --system -r requirements-dev.txt
uv pip install --system -e .[all]
- name: Check setup.py
run: |
python setup.py check
- name: Build src dist
run: |
python -m build --sdist --outdir dist
- name: Upload dist directory
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
with:
name: parsons-dist
path: dist/
test:
needs: build
strategy:
fail-fast: false
matrix:
python-version:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'
os:
- ubuntu-latest
- windows-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Download package
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
with:
name: parsons-dist
path: dist
- name: Extract requirements for cache
shell: bash
run: |
file=$(find ./dist -name 'parsons-*.tar.gz' | head -1)
# Extract to a temp directory first
mkdir -p temp_extract
tar -xzf "$file" -C temp_extract
# Find and move requirements files to root
find temp_extract -name 'requirements.txt' -exec cp {} . \; 2>/dev/null || true
# Clean up
rm -rf temp_extract
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install package
shell: bash
run: |
file=$(find ./dist -name 'parsons-*.tar.gz' | head -1)
pip install "$file"
publish:
if: github.repository_owner == 'move-coop' && github.event_name == 'release' && github.event.action == 'published'
needs: test
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Download package
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
with:
name: parsons-dist
path: dist
- name: Publish
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e
with:
verify-metadata: true
skip-existing: true
packages-dir: dist
verbose: true