Skip to content

build: modernize python stack #277

build: modernize python stack

build: modernize python stack #277

name: CI - Pull Request
on:
pull_request:
branches:
- master
jobs:
test:
needs:
- test-release
strategy:
max-parallel: 1
fail-fast: true
matrix:
python_version:
# https://python-release-cycle.glitch.me/
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
- name: Lint
uses: astral-sh/ruff-action@v3
- name: Check format
run: ruff format --check
- name: Test in staging
env:
SDC_MONITOR_TOKEN: ${{ secrets.STAGING_MONITOR_API_TOKEN }}
SDC_SECURE_TOKEN: ${{ secrets.STAGING_SECURE_API_TOKEN }}
SDC_MONITOR_URL: "https://app-staging.sysdigcloud.com"
SDC_SECURE_URL: "https://secure-staging.sysdig.com"
run: uv run mamba -f documentation -t integration
test-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup go-chglog
working-directory: /tmp
env:
VERSION: "0.10.0"
run: |
wget https://github.com/git-chglog/git-chglog/releases/download/v${VERSION}/git-chglog_${VERSION}_linux_amd64.tar.gz
gunzip git-chglog_${VERSION}_linux_amd64.tar.gz
tar -xvf git-chglog_${VERSION}_linux_amd64.tar
sudo mv git-chglog /usr/local/bin/
- name: Generate changelog
run: git-chglog -c .github/git-chglog/config.yml -o RELEASE_CHANGELOG.md $(git describe --tags $(git rev-list --tags --max-count=1))
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Build
run: uv build