diff --git a/.github/workflows/pull-request-checks.yml b/.github/workflows/pull-request-checks.yml index 7b75b940ab..43617ab8f3 100644 --- a/.github/workflows/pull-request-checks.yml +++ b/.github/workflows/pull-request-checks.yml @@ -28,62 +28,62 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} pr_required: true - comment-pull-request: - name: Comment pull request - needs: [find-pull-request] - runs-on: ubuntu-latest - container: - image: ubuntu:latest - defaults: - run: - shell: bash - steps: - - name: Setup container - run: apt update && DEBIAN_FRONTEND=noninteractive apt install -y git tzdata - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: lts/* - - name: Get workflow time - id: workflow-time - run: echo "results=$(TZ=America/Chicago date +'%B %d, %Y %H:%M:%S %Z')" >> $GITHUB_OUTPUT - - name: Comment pull request - uses: ./.github/actions/comment-pull-request - with: - token: ${{ secrets.GITHUB_TOKEN }} - pr_number: ${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).pr_number }} - comment: | - [![Pull Request Checks](https://github.com/newrelic/newrelic-browser-agent/actions/workflows/pull-request-checks.yml/badge.svg?branch=${{ github.ref_name }})](https://github.com/newrelic/newrelic-browser-agent/actions/runs/${{ github.run_id }}) + # comment-pull-request: + # name: Comment pull request + # needs: [find-pull-request] + # runs-on: ubuntu-latest + # container: + # image: ubuntu:latest + # defaults: + # run: + # shell: bash + # steps: + # - name: Setup container + # run: apt update && DEBIAN_FRONTEND=noninteractive apt install -y git tzdata + # - uses: actions/checkout@v3 + # - uses: actions/setup-node@v3 + # with: + # node-version: lts/* + # - name: Get workflow time + # id: workflow-time + # run: echo "results=$(TZ=America/Chicago date +'%B %d, %Y %H:%M:%S %Z')" >> $GITHUB_OUTPUT + # - name: Comment pull request + # uses: ./.github/actions/comment-pull-request + # with: + # token: ${{ secrets.GITHUB_TOKEN }} + # pr_number: ${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).pr_number }} + # comment: | + # [![Pull Request Checks](https://github.com/newrelic/newrelic-browser-agent/actions/workflows/pull-request-checks.yml/badge.svg?branch=${{ github.ref_name }})](https://github.com/newrelic/newrelic-browser-agent/actions/runs/${{ github.run_id }}) - Last ran on `${{ steps.workflow-time.outputs.results }}` - Checking merge of (${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).head_sha }}) into [${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).base_ref }}](https://github.com/newrelic/newrelic-browser-agent/compare/${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).head_sha }}..${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).base_sha }}) (${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).base_sha }}) - comment_tag: + # Last ran on `${{ steps.workflow-time.outputs.results }}` + # Checking merge of (${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).head_sha }}) into [${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).base_ref }}](https://github.com/newrelic/newrelic-browser-agent/compare/${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).head_sha }}..${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).base_sha }}) (${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).base_sha }}) + # comment_tag: - jest: - name: Jest unit tests - needs: find-pull-request - uses: ./.github/workflows/jest.yml - with: - ref: 'refs/pull/${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).pr_number }}/merge' - secrets: inherit + # jest: + # name: Jest unit tests + # needs: find-pull-request + # uses: ./.github/workflows/jest.yml + # with: + # ref: 'refs/pull/${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).pr_number }}/merge' + # secrets: inherit - eslint: - name: ESLint - needs: find-pull-request - uses: ./.github/workflows/eslint.yml - with: - ref: 'refs/pull/${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).pr_number }}/merge' + # eslint: + # name: ESLint + # needs: find-pull-request + # uses: ./.github/workflows/eslint.yml + # with: + # ref: 'refs/pull/${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).pr_number }}/merge' - wdio-coverage: - name: WDIO coverage - needs: find-pull-request - uses: ./.github/workflows/wdio-single-browser.yml - with: - ref: 'refs/pull/${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).pr_number }}/merge' - browser-target: chrome@latest - build-number: PR${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).pr_number}}-job-${{ github.run_number }}-attempt-${{ github.run_attempt }} - coverage: true - secrets: inherit + # wdio-coverage: + # name: WDIO coverage + # needs: find-pull-request + # uses: ./.github/workflows/wdio-single-browser.yml + # with: + # ref: 'refs/pull/${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).pr_number }}/merge' + # browser-target: chrome@latest + # build-number: PR${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).pr_number}}-job-${{ github.run_number }}-attempt-${{ github.run_attempt }} + # coverage: true + # secrets: inherit size-check: runs-on: ubuntu-latest @@ -119,15 +119,15 @@ jobs: id: asset-size-report run: | EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64) - echo "results<<$EOF" >> "$GITHUB_ENV" - echo $(cat ./build/size_report.md) >> "$GITHUB_ENV" - echo "$EOF" >> "$GITHUB_ENV" + echo "results<<$EOF" >> "$GITHUB_OUTPUT" + cat ./build/size_report.md >> "$GITHUB_OUTPUT" + echo "$EOF" >> "$GITHUB_OUTPUT" - name: Comment pull request uses: ./.github/actions/comment-pull-request with: token: ${{ secrets.GITHUB_TOKEN }} pr_number: ${{ fromJSON(needs.find-pull-request.outputs.pull-request-target).pr_number }} - comment: ${{ steps.asset-size-report.outputs }} + comment: ${{ steps.asset-size-report.outputs.results }} comment_tag: - name: Archive asset size report results uses: actions/upload-artifact@v3