Nightly Build & Test #452
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: Nightly Build & Test | |
| on: | |
| schedule: | |
| # Runs at 07:00 UTC, which corresponds to 11:00 PM PT | |
| - cron: '0 7 * * *' | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write | |
| contents: read | |
| checks: write | |
| jobs: | |
| prepare: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| commit_sha: ${{ steps.get-metadata.outputs.commit_sha }} | |
| date_prefix: ${{ steps.get-metadata.outputs.date_prefix }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| clean: true | |
| - name: Get the commit SHA | |
| id: get-metadata | |
| run: | | |
| git_short_sha=$(git rev-parse HEAD | cut -c1-7) | |
| data_prefix=$(date +'%Y/%m/%d/%H') | |
| echo "commit_sha=$git_short_sha" >> $GITHUB_OUTPUT | |
| echo "date_prefix=$data_prefix" >> $GITHUB_OUTPUT | |
| debug-build: | |
| uses: ./.github/workflows/rw-build-container.yml | |
| with: | |
| base_image_tag: ${{ vars.IMAGE_TAG_DEBUG }} | |
| build_type: "debug" | |
| secrets: | |
| aws_role_arn: "${{ secrets.DEV_AWS_ROLE_ARN }}" | |
| aws_ecr_docker_password: "${{ secrets.DEV_SUPPORT_ECR_PW }}" | |
| release-build-with-time-traces: | |
| uses: ./.github/workflows/rw-build-container.yml | |
| with: | |
| base_image_tag: ${{ vars.IMAGE_TAG_RELEASE }} | |
| build_type: "release" | |
| springtail_include_time_traces: true | |
| secrets: | |
| aws_role_arn: "${{ secrets.DEV_AWS_ROLE_ARN }}" | |
| aws_ecr_docker_password: "${{ secrets.DEV_SUPPORT_ECR_PW }}" | |
| unit-test: | |
| uses: ./.github/workflows/rw-run-unit-test.yml | |
| needs: [ debug-build, prepare ] | |
| with: | |
| image_tag: ${{ needs.debug-build.outputs.output_image_tag }} | |
| s3_log_prefix: "nightly-testlogs/${{ needs.prepare.outputs.date_prefix }}/${{ needs.prepare.outputs.commit_sha }}" | |
| build_type: "debug" | |
| reuse_code: true | |
| secrets: | |
| aws_role_arn: "${{ secrets.DEV_AWS_ROLE_ARN }}" | |
| aws_ecr_docker_password: "${{ secrets.DEV_SUPPORT_ECR_PW }}" | |
| multi-rounds-integration-test: | |
| uses: ./.github/workflows/rw-run-integration-test.yml | |
| needs: [ debug-build, prepare ] | |
| with: | |
| image_tag: ${{ needs.debug-build.outputs.output_image_tag }} | |
| s3_log_prefix: "nightly-testlogs/${{ needs.prepare.outputs.date_prefix }}/${{ needs.prepare.outputs.commit_sha }}" | |
| config_to_run: "nightly" | |
| system_settings_override: '.github/workflows/nightly.overrides.json' | |
| iterations: "1" | |
| build_type: "debug" | |
| reuse_code: true | |
| timeout_minutes: 120 | |
| secrets: | |
| aws_role_arn: "${{ secrets.DEV_AWS_ROLE_ARN }}" | |
| aws_ecr_docker_password: "${{ secrets.DEV_SUPPORT_ECR_PW }}" | |
| performance-test: | |
| uses: ./.github/workflows/rw-run-performance-test.yml | |
| needs: [ release-build-with-time-traces, prepare ] | |
| with: | |
| image_tag: ${{ needs.release-build-with-time-traces.outputs.output_image_tag }} | |
| s3_log_prefix: "nightly-testlogs/${{ needs.prepare.outputs.date_prefix }}/${{ needs.prepare.outputs.commit_sha }}" | |
| system_settings_override: '.github/workflows/nightly.overrides.json' | |
| build_type: "release" | |
| reuse_code: true | |
| secrets: | |
| aws_role_arn: "${{ secrets.DEV_AWS_ROLE_ARN }}" | |
| aws_ecr_docker_password: "${{ secrets.DEV_SUPPORT_ECR_PW }}" | |
| slack-notification: | |
| uses: ./.github/workflows/rw-notify-slack.yml | |
| needs: [ prepare, unit-test, multi-rounds-integration-test, performance-test ] | |
| if: needs.unit-test.result != 'skipped' && needs.multi-rounds-integration-test.result != 'skipped' && needs.performance-test.result != 'skipped' | |
| with: | |
| slack_webhook_url: ${{ vars.GENERIC_SLACK_WEBHOOK_URL }} | |
| # Need to create a new channel for PR notifications. | |
| slack_channel: "#nightly-builds" | |
| text: > | |
| Nightly builds has completed for ${{ needs.prepare.outputs.date_prefix }} - ${{ needs.prepare.outputs.commit_sha }}. | |
| attachment: | | |
| { | |
| color": "${{ needs.unit-test.result == 'success' && needs.multi-rounds-integration-test.result == 'success' && needs.performance-test.result == 'success' && 'good' || 'danger' }}", | |
| "fields": [ | |
| { | |
| "title": "Unit Test", | |
| "value": "${{ needs.unit-test.result }}; logs: <${{ needs.unit-test.outputs.test_log_s3_uri }}|here>", | |
| "short": false | |
| }, | |
| { | |
| "title": "Multi-rounds Integration Test", | |
| "value": "${{ needs.multi-rounds-integration-test.result }}; last logs: <${{ needs.multi-rounds-integration-test.outputs.test_log_s3_uri }}|here>; last springtail logs: <${{ needs.multi-rounds-integration-test.outputs.springtail_log_s3_uri }}|here>", | |
| "short": false | |
| }, | |
| { | |
| "title": "Performance Test", | |
| "value": "${{ needs.performance-test.result }}; logs: <${{ needs.performance-test.outputs.test_log_s3_uri }}|here>", | |
| "short": false | |
| }, | |
| { | |
| "title": "Commit SHA", | |
| "value": "${{ needs.prepare.outputs.commit_sha }}", | |
| "short": false | |
| }, | |
| { | |
| "title": "All Logs", | |
| "value": "s3://devsupport.springtail.internal/nightly-testlogs/${{ needs.prepare.outputs.date_prefix }}/${{ needs.prepare.outputs.commit_sha }}", | |
| "short": false | |
| } | |
| ] | |
| } |