Skip to content

ci: add autofix for pr #9112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: autofix.ci

on:
pull_request:
permissions:
contents: read

jobs:
autofix:
runs-on: ubuntu-latest
env:
PUPPETEER_SKIP_DOWNLOAD: 'true'
steps:
- uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Set node version to 18
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm

- run: pnpm install

- name: Run eslint
run: pnpm run lint --fix

- name: Run prettier
run: pnpm run format

- uses: autofix-ci/action@8caa572fd27b0019a65e4c695447089c8d3138b9
15 changes: 6 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
unit-test:
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
env:
PUPPETEER_SKIP_DOWNLOAD: 'true'
steps:
- uses: actions/checkout@v3

Expand All @@ -26,9 +28,6 @@ jobs:
node-version: 18
cache: 'pnpm'

- name: Skip Puppeteer download
run: echo "PUPPETEER_SKIP_DOWNLOAD=1" >> $GITHUB_ENV

- run: pnpm install

- name: Run unit tests
Expand All @@ -37,6 +36,8 @@ jobs:
unit-test-windows:
runs-on: windows-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
env:
PUPPETEER_SKIP_DOWNLOAD: 'true'
steps:
- uses: actions/checkout@v3

Expand All @@ -49,9 +50,6 @@ jobs:
node-version: 18
cache: 'pnpm'

- name: Skip Puppeteer download
run: echo "PUPPETEER_SKIP_DOWNLOAD=1" >> $env:GITHUB_ENV

- run: pnpm install

- name: Run compiler unit tests
Expand Down Expand Up @@ -89,6 +87,8 @@ jobs:
lint-and-test-dts:
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
env:
PUPPETEER_SKIP_DOWNLOAD: 'true'
steps:
- uses: actions/checkout@v3

Expand All @@ -101,9 +101,6 @@ jobs:
node-version: 18
cache: 'pnpm'

- name: Skip Puppeteer download
run: echo "PUPPETEER_SKIP_DOWNLOAD=1" >> $GITHUB_ENV

- run: pnpm install

- name: Run eslint
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/size-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
permissions:
contents: read

env:
PUPPETEER_SKIP_DOWNLOAD: 'true'

jobs:
upload:
runs-on: ubuntu-latest
Expand All @@ -28,7 +31,7 @@ jobs:
cache: pnpm

- name: Install dependencies
run: PUPPETEER_SKIP_DOWNLOAD=1 pnpm install
run: pnpm install

- run: pnpm run size

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/size-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ permissions:
pull-requests: write
issues: write

env:
PUPPETEER_SKIP_DOWNLOAD: 'true'

jobs:
size-report:
runs-on: ubuntu-latest
Expand All @@ -30,7 +33,7 @@ jobs:
cache: pnpm

- name: Install dependencies
run: PUPPETEER_SKIP_DOWNLOAD=1 pnpm install
run: pnpm install

- name: Download PR number
uses: dawidd6/action-download-artifact@v2
Expand Down