nightly-check #27
This file contains 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: nightly-check | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
env: | |
GCP_SA_KEY_INFRA: ${{ secrets.GCP_SA_KEY_INFRA }} | |
GCP_SA_KEY_APP: ${{ secrets.GCP_SA_KEY_APP }} | |
SLACK_SIGNING_SECRET: ${{ secrets.SLACK_SIGNING_SECRET }} | |
SLACK_CLIENT_ID: ${{ secrets.SLACK_CLIENT_ID }} | |
SLACK_CLIENT_SECRET: ${{ secrets.SLACK_CLIENT_SECRET }} | |
MONITORING_SLACK_URL: ${{ secrets.MONITORING_SLACK_URL }} | |
GOOGLE_ANALYTICS_MEASUREMENT_ID: ${{ secrets.GOOGLE_ANALYTICS_MEASUREMENT_ID }} | |
GOOGLE_ANALYTICS_API_SECRET: ${{ secrets.GOOGLE_ANALYTICS_API_SECRET }} | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
concurrency: | |
group: ${{ github.ref }}-build | |
cancel-in-progress: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Gradle | |
uses: ./.github/actions/setup-gradle | |
- name: Build services | |
run: | | |
set -Eeuo pipefail | |
# This Gradle task runs across all compisite build projects and because it's invoked from | |
# the root it'll try to use concurrent yarn instances that all try to write to the same output | |
# folder. A single Gradle worker avoids this at the cost of a slower build but this is okay for now. | |
./gradlew --no-daemon --max-workers=1 assemble | |
- name: Preview infrastructure | |
uses: ./.github/actions/infra | |
with: | |
command: preview | |
service: common | |
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 | |
path: | | |
**/build | |
**/secrets.properties | |
**/infra | |
- name: Slack report | |
uses: slackapi/[email protected] | |
if: always() # Ensure report is sent, even after errors | |
with: | |
payload: | | |
{ | |
"text": "🌓️️ Nightly job <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.job }}> ${{ job.status }}" | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ env.MONITORING_SLACK_URL }} | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK | |
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 | |
- name: Slack report | |
uses: slackapi/[email protected] | |
if: always() # Ensure report is sent, even after errors | |
with: | |
payload: | | |
{ | |
"text": "🌓️️ Nightly job <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.job }}> ${{ job.status }}" | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ env.MONITORING_SLACK_URL }} | |
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK |