diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c82ebe66ba..022ff03127 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,68 +20,68 @@ env: jobs: - # build: - # name: Compile the app - # runs-on: ubuntu-22.04 - # timeout-minutes: 60 + build: + name: Compile the app + runs-on: ubuntu-22.04 + timeout-minutes: 60 - # steps: - # - name: Install bats - # run: | - # sudo apt-get update - # sudo apt-get install -y bats + steps: + - name: Install bats + run: | + sudo apt-get update + sudo apt-get install -y bats - # - name: Login to Docker Hub - # uses: docker/login-action@v3 - # with: - # username: ${{ env.DOCKERHUB_USERNAME }} - # password: ${{ secrets.DOCKERHUB_TOKEN }} - # if: ${{ env.INTERNAL_CONTRIBUTOR }} + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ env.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + if: ${{ env.INTERNAL_CONTRIBUTOR }} - # - name: Configure AWS credentials - # uses: aws-actions/configure-aws-credentials@v4 - # with: - # aws-access-key-id: ${{ secrets.ECR_ACCESS_KEY_ID }} - # aws-secret-access-key: ${{ secrets.ECR_SECRET_ACCESS_KEY }} - # aws-region: eu-west-2 - # if: ${{ env.INTERNAL_CONTRIBUTOR }} + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.ECR_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.ECR_SECRET_ACCESS_KEY }} + aws-region: eu-west-2 + if: ${{ env.INTERNAL_CONTRIBUTOR }} - # - name: Login to Amazon ECR - # id: login-ecr - # if: ${{ env.INTERNAL_CONTRIBUTOR }} - # uses: aws-actions/amazon-ecr-login@v2 - # with: - # mask-password: 'true' + - name: Login to Amazon ECR + id: login-ecr + if: ${{ env.INTERNAL_CONTRIBUTOR }} + uses: aws-actions/amazon-ecr-login@v2 + with: + mask-password: 'true' - # - uses: actions/checkout@v4 - # - name: Use Node.js ${{ env.NODE_VERSION }} - # uses: actions/setup-node@v4 - # with: - # node-version: ${{ env.NODE_VERSION }} - # - name: Create logs directory - # run: mkdir tests/logs - # - run: npm ci - # - name: Compile - # run: npm run ci-compile - # - name: Setup QEMU - # if: ${{ env.INTERNAL_CONTRIBUTOR }} - # uses: docker/setup-qemu-action@v3 - # - name: Setup Buildx - # if: ${{ env.INTERNAL_CONTRIBUTOR }} - # uses: docker/setup-buildx-action@v3 - # - name: Publish for testing - # run: npm run publish-for-testing - # - name: Upload docker images as artifacts - # uses: actions/upload-artifact@v4 - # with: - # name: cht-images - # path: images/ - # if: ${{ !env.INTERNAL_CONTRIBUTOR }} - # - name: Search-Replace PR Body - # if: ${{ env.INTERNAL_CONTRIBUTOR && github.event_name == 'pull_request' }} - # uses: ./.github/actions/update-staging-url-placeholders - # with: - # token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v4 + - name: Use Node.js ${{ env.NODE_VERSION }} + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + - name: Create logs directory + run: mkdir tests/logs + - run: npm ci + - name: Compile + run: npm run ci-compile + - name: Setup QEMU + if: ${{ env.INTERNAL_CONTRIBUTOR }} + uses: docker/setup-qemu-action@v3 + - name: Setup Buildx + if: ${{ env.INTERNAL_CONTRIBUTOR }} + uses: docker/setup-buildx-action@v3 + - name: Publish for testing + run: npm run publish-for-testing + - name: Upload docker images as artifacts + uses: actions/upload-artifact@v4 + with: + name: cht-images + path: images/ + if: ${{ !env.INTERNAL_CONTRIBUTOR }} + - name: Search-Replace PR Body + if: ${{ env.INTERNAL_CONTRIBUTOR && github.event_name == 'pull_request' }} + uses: ./.github/actions/update-staging-url-placeholders + with: + token: ${{ secrets.GITHUB_TOKEN }} # config-tests: # needs: build @@ -210,6 +210,7 @@ jobs: # - run: npm run lint-translations tests: + needs: build name: ${{ matrix.cmd }}-${{ matrix.suite || '' }}${{ matrix.chrome-version == '90' && '-minimum-browser' || '' }} runs-on: ubuntu-22.04 timeout-minutes: 60