Add Zizmor job and address all reported issues #1298
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
schedule: | |
- cron: "0 0 * * Fri" | |
defaults: | |
run: | |
shell: bash | |
permissions: {} | |
jobs: | |
default: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-22.04 | |
- ubuntu-22.04-arm | |
- ubuntu-24.04 | |
- ubuntu-24.04-arm | |
- macos-14 | |
- macos-15 | |
- macos-15-intel | |
- macos-26 | |
- windows-11-arm | |
- windows-2022 | |
- windows-2025 | |
steps: | |
- uses: actions/checkout@v5 | |
with: | |
persist-credentials: false | |
- name: Run setup-postgres | |
uses: ./ | |
id: postgres | |
- name: Run setup-python | |
uses: actions/setup-python@v6 | |
with: | |
python-version: "3.13" | |
# PostgreSQL has no native ARM64 build for Windows, so the x64 | |
# version is installed instead. This means CPython for x64 must be | |
# used, so psycopg can properly link to PostgreSQL's libpq. | |
architecture: ${{ matrix.os == 'windows-11-arm' && 'x64' || '' }} | |
- name: Run tests | |
run: | | |
python3 -m pip install -r tests/requirements.txt | |
python3 -m pytest -vv tests/test_action.py | |
env: | |
CONNECTION_URI: ${{ steps.postgres.outputs.connection-uri }} | |
SERVICE_NAME: ${{ steps.postgres.outputs.service-name }} | |
CERTIFICATE_PATH: ${{ steps.postgres.outputs.certificate-path }} | |
EXPECTED_CONNECTION_URI: postgresql://postgres:postgres@localhost:5432/postgres | |
EXPECTED_SERVICE_NAME: postgres | |
EXPECTED_SERVER_VERSION: "18" | |
EXPECTED_SSL: false | |
parametrized: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-22.04 | |
- ubuntu-22.04-arm | |
- ubuntu-24.04 | |
- ubuntu-24.04-arm | |
- macos-14 | |
- macos-15 | |
- macos-15-intel | |
- macos-26 | |
- windows-11-arm | |
- windows-2022 | |
- windows-2025 | |
postgres-version: | |
- "14" | |
- "15" | |
- "16" | |
- "17" | |
steps: | |
- uses: actions/checkout@v5 | |
with: | |
persist-credentials: false | |
- name: Run setup-postgres | |
uses: ./ | |
with: | |
username: yoda | |
password: GrandMaster | |
database: jedi_order | |
port: 34837 | |
postgres-version: ${{ matrix.postgres-version }} | |
ssl: true | |
id: postgres | |
- name: Run setup-python | |
uses: actions/setup-python@v6 | |
with: | |
python-version: "3.13" | |
# PostgreSQL has no native ARM64 build for Windows, so the x64 | |
# version is installed instead. This means CPython for x64 must be | |
# used, so psycopg can properly link to PostgreSQL's libpq. | |
architecture: ${{ matrix.os == 'windows-11-arm' && 'x64' || '' }} | |
- name: Run tests | |
run: | | |
python3 -m pip install -r tests/requirements.txt | |
python3 -m pytest -vv tests/test_action.py | |
env: | |
CONNECTION_URI: ${{ steps.postgres.outputs.connection-uri }} | |
SERVICE_NAME: ${{ steps.postgres.outputs.service-name }} | |
CERTIFICATE_PATH: ${{ steps.postgres.outputs.certificate-path }} | |
EXPECTED_CONNECTION_URI: postgresql://yoda:GrandMaster@localhost:34837/jedi_order?sslmode=verify-ca&sslrootcert=${{ steps.postgres.outputs.certificate-path }} | |
EXPECTED_SERVICE_NAME: yoda | |
EXPECTED_SERVER_VERSION: ${{ matrix.postgres-version }} | |
EXPECTED_SSL: true | |
zizmor: | |
runs-on: ubuntu-latest | |
permissions: | |
security-events: write | |
steps: | |
- uses: actions/checkout@v5 | |
with: | |
persist-credentials: false | |
- name: Run zizmor | |
uses: zizmorcore/zizmor-action@e673c3917a1aef3c65c972347ed84ccd013ecda4 |