Skip to content

feat: polish and stabilize the fail-safe release pipeline #7019

feat: polish and stabilize the fail-safe release pipeline

feat: polish and stabilize the fail-safe release pipeline #7019

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
env:
POSTGRES_DB: scancodeio
POSTGRES_USER: scancodeio
POSTGRES_PASSWORD: scancodeio
POSTGRES_INITDB_ARGS: --encoding=UTF-8 --lc-collate=en_US.UTF-8 --lc-ctype=en_US.UTF-8
jobs:
check-commits:
name: Validate Commits
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: commitizen-tools/commitizen-action@master
with:
push: false
commit: true
test:
name: Test (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
services:
postgres:
image: postgres:17
env:
POSTGRES_DB: ${{ env.POSTGRES_DB }}
POSTGRES_USER: ${{ env.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
POSTGRES_INITDB_ARGS: ${{ env.POSTGRES_INITDB_ARGS }}
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y universal-ctags gettext
- name: Install project dependencies
run: make dev envfile
- name: Linting & Formatting
run: make check
- name: Validation Checks
run: |
make check-deploy
make docs
- name: Run Unit Tests
run: .venv/bin/python manage.py test --verbosity=2 --noinput
env:
SCANCODEIO_DB_NAME: ${{ env.POSTGRES_DB }}
SCANCODEIO_DB_USER: ${{ env.POSTGRES_USER }}
SCANCODEIO_DB_PASSWORD: ${{ env.POSTGRES_PASSWORD }}
build-check:
name: Build Verification
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- run: python -m pip install build
- run: python -m build