Skip to content

chore(ci): remove prod deployment and promotion jobs #1705

chore(ci): remove prod deployment and promotion jobs

chore(ci): remove prod deployment and promotion jobs #1705

Workflow file for this run

name: Analysis
on:
push:
branches: [main]
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
schedule:
- cron: "0 12 * * 0" # 4 AM PST = 12 PM UDT, runs sundays
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
# https://github.com/marketplace/actions/aqua-security-trivy
trivy:
name: Trivy Security Scan
permissions:
contents: read # Required for checkout
security-events: write # Required for uploading SARIF results to Security tab
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: ubuntu-26.04
steps:
- uses: actions/checkout@v7
- name: Run Trivy vulnerability scanner in repo mode
uses: aquasecurity/trivy-action@ed142fd0673e97e23eac54620cfb913e5ce36c25 # v0.36.0
with:
format: "sarif"
output: "trivy-results.sarif"
ignore-unfixed: true
scan-type: "fs"
scanners: "vuln,secret,config"
severity: "CRITICAL,HIGH"
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v4
with:
sarif_file: "trivy-results.sarif"
java:
name: Java
permissions:
contents: read # Required for checkout
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: ubuntu-26.04
defaults:
run:
working-directory: backend-java
services:
postgres:
image: postgres
env:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v6
with:
distribution: "temurin"
java-version: "25"
- name: Cache local Maven repository
uses: actions/cache@v6
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Run unit tests
run: mvn -f pom.xml clean package
python:
name: Python
permissions:
contents: read # Required for checkout
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: ubuntu-26.04
defaults:
run:
working-directory: backend-py
services:
postgres:
image: postgres
env:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.14"
- name: Install UV
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Add UV to PATH
run: echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Cache UV dependencies
uses: actions/cache@v6
with:
path: .venv
key: uv-${{ hashFiles('**/uv.lock') }}
- name: Install dependencies
run: uv sync --group dev
- name: Run tests
run: uv run pytest
results:
name: Analysis Results
needs: [trivy, java, python]
if: always()
runs-on: ubuntu-26.04
steps:
- uses: bcgov/actions/workflow-results@4026bfd276b8a5839029106099b13edfb594b2c3 # v0.8.0
with:
needs: ${{ toJson(needs) }}
title: "Analysis Results"