Build #4821
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: "Build" | |
| run-name: "Build" | |
| on: | |
| push: | |
| branches: [ develop ] | |
| pull_request: | |
| branches: [ develop ] | |
| workflow_dispatch: | |
| inputs: | |
| run_integration_tests: | |
| description: 'Run integration tests' | |
| required: true | |
| type: boolean | |
| default: true | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| permissions: | |
| contents: read | |
| issues: none | |
| pull-requests: none | |
| jobs: | |
| integration-test: | |
| name: Integration Test | |
| if: ${{ github.actor != 'dependabot[bot]' && !contains(github.event.head_commit.message, '[skip ci]') && (github.event_name != 'workflow_dispatch' || inputs.run_integration_tests) }} | |
| uses: ./.github/workflows/integration.yml | |
| with: | |
| suite: full | |
| frontend_ref: ${{ github.ref_name == 'main' && github.ref_name || 'main' }} | |
| caller: build | |
| secrets: inherit | |
| build-amd64: | |
| name: Build AMD64 | |
| env: | |
| FORCE_COLOR: 1 | |
| PYTHONUNBUFFERED: 1 | |
| PYTHONDONTWRITEBYTECODE: 1 | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| PLATFORM: amd64 | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| cache: 'pip' | |
| - name: Login to Docker Hub | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Test platform | |
| run: make docker-env test | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Build and smoke test Docker images | |
| run: make docker-env build-docker smoke-test-docker | |
| - name: Publish Docker `latest` artifacts | |
| if: github.ref_name == 'develop' | |
| run: make publish | |
| - name: Dump Docker logs on failure | |
| if: failure() | |
| uses: jwalton/gh-docker-logs@v2 | |
| build-arm64: | |
| name: Build ARM64 | |
| env: | |
| FORCE_COLOR: 1 | |
| PYTHONUNBUFFERED: 1 | |
| PYTHONDONTWRITEBYTECODE: 1 | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| PLATFORM: arm64 | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| cache: 'pip' | |
| - name: Login to Docker Hub | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v4 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Test platform | |
| run: make docker-env test | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Build and smoke test Docker images | |
| run: make docker-env build-docker smoke-test-docker | |
| - name: Publish Docker `latest` artifacts | |
| if: github.ref_name == 'develop' | |
| run: make publish | |
| - name: Upload test coverage | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| directory: ./build/coverage | |
| - name: Upload test results | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@v6 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| directory: ./build/test-results | |
| report_type: test_results | |
| - name: Dump Docker logs on failure | |
| if: failure() | |
| uses: jwalton/gh-docker-logs@v2 | |
| deploy-ci: | |
| name: Deploy CI | |
| needs: [build-amd64, build-arm64] | |
| env: | |
| DEV_ENV_ENABLED: ${{ vars.DEV_ENV_ENABLED || false }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Generate GitHub App token | |
| if: ${{ github.ref_name == 'develop' && env.DEV_ENV_ENABLED == 'true' }} | |
| id: app-token | |
| uses: actions/create-github-app-token@v3 | |
| with: | |
| client-id: ${{ secrets.HELIUM_BOT_APP_ID }} | |
| private-key: ${{ secrets.HELIUM_BOT_PRIVATE_KEY }} | |
| skip-token-revoke: true | |
| - name: Trigger deployment to dev | |
| if: ${{ github.ref_name == 'develop' && env.DEV_ENV_ENABLED == 'true' }} | |
| env: | |
| GH_TOKEN: ${{ steps.app-token.outputs.token }} | |
| run: | | |
| gh workflow run deploy.yml \ | |
| --ref develop \ | |
| -f version_type=latest \ | |
| -f environment=dev \ | |
| -f run_legacy_cluster_tests=true | |
| echo "Triggered deploy workflow for dev environment with latest containers" | |
| echo "View workflow runs: https://github.com/${{ github.repository }}/actions/workflows/deploy.yml" |