Skip to content

Nightly CI checks

Nightly CI checks #29

Workflow file for this run

name: staging-check
on:
pull_request:
branches: [ master ]
env:
GCP_SA_KEY_INFRA: ${{ secrets.GCP_SA_KEY_INFRA }}
jobs:
detect-changed-services:
runs-on: ubuntu-24.04
concurrency:
group: ${{ github.ref }}-detect-changed-services
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Collect all changed services
uses: ./.github/actions/detect-changed-services
id: changed-services
outputs:
changed_services: ${{ steps.changed-services.outputs.changed_services }}
build-service:
if: needs.detect-changed-services.outputs.changed_services != ''
runs-on: ubuntu-24.04
strategy:
matrix:
service: ${{ fromJSON(needs.detect-changed-services.outputs.changed_services) }}
concurrency:
group: ${{ github.ref }}-${{ matrix.service }}-build-service
cancel-in-progress: true
needs: detect-changed-services
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Gradle
uses: ./.github/actions/setup-gradle
- name: Build service
uses: ./.github/actions/build-service
with:
service: ${{ matrix.service }}
- name: Build container images
run: |
set -Eeuo pipefail
if [ -e "tools/docker/${{ matrix.service }}-compose.yaml" ]; then
docker compose -f tools/docker/${{ matrix.service }}-compose.yaml build
else
echo "Skipping step as required file doesn't exist"
fi
- name: Preview infrastructure
uses: pulumi/actions@v5
with:
command: preview
stack-name: prod
work-dir: ${{ matrix.service }}/infra
edit-pr-comment: false
pulumi-version: ${{ env.PULUMI_VERSION }}
env:
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
- name: Artifacts
uses: actions/upload-artifact@v4
if: always() # Ensure all artifacts are collected, even after errors
with:
name: Build (${{ matrix.service }})
path: |
**/build
${{ matrix.service }}/infra
unit-test:
runs-on: ubuntu-24.04
concurrency:
group: ${{ github.ref }}-unit-test
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Test
uses: ./.github/actions/unit-test