Skip to content

catch up main and add catch #33

catch up main and add catch

catch up main and add catch #33

name: CheckConsoleErrors
on:
pull_request:
branches: [main]
types: [opened, synchronize]
permissions:
contents: read
<<<<<<< HEAD

Check failure on line 8 in .github/workflows/check_for_console_errors.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/check_for_console_errors.yml

Invalid workflow file

You have an error in your yaml syntax on line 8
=======
id-token: write
>>>>>>> console-error-pr-check
jobs:
CheckConsoleErrors:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 https://github.com/actions/checkout/commit/f43a0e5ff2bd294095638e18286ca9a3d1956744
<<<<<<< HEAD
- name: Setup Node.js 16.x
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 https://github.com/actions/setup-node/commit/e33196f7422957bea03ed53f6fbb155025ffc7b8
with:
node-version: 16.x
=======
- name: Setup Node.js 20.x
uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 https://github.com/actions/setup-node/commit/e33196f7422957bea03ed53f6fbb155025ffc7b8
with:
node-version: 20.x
>>>>>>> console-error-pr-check
- name: Install Dependencies
run: yarn
- name: Run Build
run: yarn build
env:
NODE_OPTIONS: --max_old_space_size=4096
- name: Run Server
run: |
<<<<<<< HEAD
python -m http.server 3000 -d ${{ vars.BUILD_DIR }} &
sleep 5
- name: Run Console Errors
id: consoleErrors
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 https://github.com/actions/github-script/commit/d7906e4ad0b1822421a7e6a35d5ca353c962f410
=======
node ./node_modules/.bin/serve client/www/next-build --no-request-logging &
sleep 5
- name: Run Console Errors
id: consoleErrors
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 https://github.com/actions/github-script/commit/60a0d83039c74a4aee543508d2ffcb1c3799cdea
>>>>>>> console-error-pr-check
with:
result-encoding: string
script: |
const { consoleErrors } = require('./tasks/console-errors.js');
return await consoleErrors();
- name: Fail if console errors have been found
if: ${{ steps.consoleErrors.outputs.result }}
run: exit 1