build(deps): bump typescript from 5.5.4 to 5.6.3 #4773
This file contains 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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Presubmit | |
on: | |
pull_request_target: | |
push: | |
branches: [main] | |
workflow_dispatch: | |
# Needed for pushing baselines commit. | |
permissions: | |
contents: write | |
jobs: | |
presubmit: | |
runs-on: ubuntu-22.04 | |
env: | |
Editable: github.event_name == 'pull_request_target' || github.event_name == 'workflow_dispatch' | |
steps: | |
- uses: actions/checkout@v4.2.2 | |
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' | |
- uses: actions/checkout@v4.2.2 | |
if: github.event_name == 'pull_request_target' | |
with: | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: Use LTS Node.js | |
uses: actions/setup-node@v4.0.4 | |
with: | |
node-version: lts/* | |
- name: Install Japanese Fonts | |
run: | | |
sudo apt-get update | |
sudo apt-get install fonts-noto-cjk | |
- run: npm ci | |
- name: Lint, build, and test | |
id: run-tests | |
run: npm run presubmit:coverage | |
- name: Check for screenshot failures | |
id: check-screenshots | |
if: failure() | |
run: echo "screenshot_failure=$(ls -1 screenshots/Chromium/failed | wc -l)" >> $GITHUB_OUTPUT | |
- name: Upload failing screenshots and diffs | |
uses: actions/upload-artifact@v4 | |
if: failure() && steps.check-screenshots.outputs.screenshot_failure > 0 | |
with: | |
name: screenshot_failures | |
path: screenshots/Chromium/failed/ | |
- name: Update baseline screenshots | |
run: npm run test:update-baselines | |
if: failure() && steps.check-screenshots.outputs.screenshot_failure > 0 && env.Editable | |
- name: Push new baselines to pull request branch | |
uses: EndBug/add-and-commit@v9.1.4 | |
if: failure() && steps.check-screenshots.outputs.screenshot_failure > 0 && env.Editable | |
with: | |
message: 'test(visual): Update baselines with new screenshots' | |
fetch: false | |
add: 'screenshots/Chromium/baseline/*.png' | |
default_author: github_actions | |
- name: Try to fix lint errors | |
run: npm run fix | |
if: failure() && env.Editable | |
- name: Push lint fixes to pull request branch | |
uses: EndBug/add-and-commit@v9.1.4 | |
if: failure() && env.Editable | |
with: | |
message: 'style: Fix lint/formatting errors' | |
fetch: false | |
add: . -- ':!screenshots' | |
default_author: github_actions | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./coverage/lcov.info | |
fail_ci_if_error: true | |
verbose: true |