test: increase timeout after manual login in TC-2763 [WPB-22420] (#21… #13939
Workflow file for this run
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: precommit | |
| #on: | |
| # pull_request: | |
| # # we want to run the CI on every PR targetting those branches | |
| # branches: [dev] | |
| concurrency: | |
| group: precommit-deploy | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| unit_tests_report: ${{ env.UNIT_TEST_REPORT_FILE }} | |
| build_artifact: ${{ env.BUILD_ARTIFACT }} | |
| total_additions: ${{ steps.check_additions.outputs.total_additions }} | |
| env: | |
| BUILD_DIR: apps/server/dist/s3/ | |
| BUILD_ARTIFACT: ebs.zip | |
| COMMIT_URL: ${{github.event.head_commit.url}} | |
| COMMITTER: ${{github.event.head_commit.committer.name}} | |
| CHANGELOG_FILE: './changelog.md' | |
| UNIT_TEST_REPORT_FILE: './unit-tests.log' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'yarn' | |
| - name: Install JS dependencies | |
| run: yarn --immutable | |
| - name: Update configuration | |
| run: yarn nx run webapp:configure | |
| - name: Build and package | |
| run: yarn nx run server:package | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a | |
| with: | |
| name: 'build-artifact' | |
| path: '${{env.BUILD_DIR}}${{env.BUILD_ARTIFACT}}' | |
| - name: Check total PR additions | |
| id: check_additions | |
| run: | | |
| total_additions=$(gh api -H "Accept: application/vnd.github.v3+json" \ | |
| "repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}" \ | |
| | jq -r '.additions') | |
| if [ -z "$total_additions" ] || [ "$total_additions" = "null" ]; then | |
| echo "Error: Could not extract additions" | |
| exit 1 | |
| fi | |
| echo "Found total additions: $total_additions" | |
| echo "total_additions=$total_additions" >> $GITHUB_OUTPUT | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| deploy_to_aws: | |
| name: 'Deploy to live environments' | |
| runs-on: ubuntu-24.04 | |
| env: | |
| AWS_REGION: eu-central-1 | |
| needs: [build] | |
| steps: | |
| - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c | |
| with: | |
| name: 'build-artifact' | |
| - name: Check if deploy is necessary | |
| id: check_deploy | |
| if: ${{ always() }} | |
| run: | | |
| if [[ ${{ needs.build.outputs.total_additions }} -le 100 || "${{ github.actor }}" == "renovate[bot]" ]]; then | |
| echo "Skipping deployment" | |
| exit 0 | |
| fi | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@ec61189d14ec14c8efccab744f656cffd0e33f37 | |
| with: | |
| aws-access-key-id: ${{ secrets.WEBTEAM_AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.WEBTEAM_AWS_SECRET_ACCESS_KEY }} | |
| aws-region: ${{ env.AWS_REGION }} | |
| - name: Deploy to precommit environment | |
| id: deploy | |
| uses: aws-actions/aws-elasticbeanstalk-deploy@1f56e4e813ae4eb167e69ca324234c336c1df573 | |
| with: | |
| aws-region: ${{ env.AWS_REGION }} | |
| application-name: Webapp | |
| environment-name: wire-webapp-precommit | |
| version-label: ${{ github.run_id }} | |
| deployment-package-path: ${{ needs.build.outputs.build_artifact }} | |
| wait-for-deployment: true | |
| wait-for-environment-recovery: true | |
| deployment-timeout: 150 | |
| use-existing-application-version-if-available: true | |
| - name: Deployment Status | |
| if: ${{ always() }} | |
| run: | | |
| if [[ "${{ steps.deploy.outcome }}" == "success" ]]; then | |
| echo "✅ Deployment completed successfully" | |
| elif [[ "${{ steps.deploy.outcome }}" == "skipped" ]]; then | |
| if [[ "${{ needs.build.outputs.total_additions }}" -le 100 ]]; then | |
| echo "⏭️ Deployment was skipped: PR has ${{ needs.build.outputs.total_additions }} additions (threshold: 100)" | |
| elif [[ "${{ github.actor }}" == "renovate[bot]" ]]; then | |
| echo "⏭️ Deployment was skipped: PR is from renovate" | |
| else | |
| echo "⏭️ Deployment was skipped" | |
| fi | |
| else | |
| echo "❌ Deployment failed" | |
| exit 1 | |
| fi |