From 12adb9a66769a36029fc052b059599a406797937 Mon Sep 17 00:00:00 2001 From: Zopolis4 Date: Tue, 9 Sep 2025 00:20:39 +1000 Subject: [PATCH 1/2] ci(web): Add eslint CI --- .github/workflows/Eslint.yml | 22 ++++++++++++++++++++++ .github/workflows/Handoff.yml | 7 +++++++ 2 files changed, 29 insertions(+) create mode 100644 .github/workflows/Eslint.yml diff --git a/.github/workflows/Eslint.yml b/.github/workflows/Eslint.yml new file mode 100644 index 0000000..0cf7580 --- /dev/null +++ b/.github/workflows/Eslint.yml @@ -0,0 +1,22 @@ +name: Eslint +on: + workflow_call: + inputs: + subrepo: + required: true + type: string +jobs: + eslint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: eslint + uses: reviewdog/action-eslint@556a3fdaf8b4201d4d74d406013386aa4f7dab96 # v1.34.0 + with: + fail_level: any + filter_mode: nofilter + reporter: github-check + workdir: ${{ inputs.subrepo }} diff --git a/.github/workflows/Handoff.yml b/.github/workflows/Handoff.yml index 221e887..757a836 100644 --- a/.github/workflows/Handoff.yml +++ b/.github/workflows/Handoff.yml @@ -58,3 +58,10 @@ jobs: if: contains(needs.handoff.outputs.category, 'TypeScript') && contains(needs.handoff.outputs.directory, 'web') with: subrepo: web + + web-eslint: + needs: handoff + uses: ./.github/workflows/Eslint.yml + if: contains(needs.handoff.outputs.category, 'TypeScript') && contains(needs.handoff.outputs.directory, 'web') + with: + subrepo: web From bbf5b1e6e26147a3d4768c33c065090ba5c2875b Mon Sep 17 00:00:00 2001 From: Zopolis4 Date: Tue, 9 Sep 2025 00:57:25 +1000 Subject: [PATCH 2/2] ci(web): Add prettier CI --- .github/workflows/Handoff.yml | 7 +++++++ .github/workflows/Prettier.yml | 24 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 .github/workflows/Prettier.yml diff --git a/.github/workflows/Handoff.yml b/.github/workflows/Handoff.yml index 757a836..69296b0 100644 --- a/.github/workflows/Handoff.yml +++ b/.github/workflows/Handoff.yml @@ -65,3 +65,10 @@ jobs: if: contains(needs.handoff.outputs.category, 'TypeScript') && contains(needs.handoff.outputs.directory, 'web') with: subrepo: web + + web-prettier: + needs: handoff + uses: ./.github/workflows/Prettier.yml + if: contains(needs.handoff.outputs.directory, 'web') + with: + subrepo: web diff --git a/.github/workflows/Prettier.yml b/.github/workflows/Prettier.yml new file mode 100644 index 0000000..e2b34af --- /dev/null +++ b/.github/workflows/Prettier.yml @@ -0,0 +1,24 @@ +name: Prettier +on: + workflow_call: + inputs: + subrepo: + required: true + type: string +jobs: + prettier: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: prettier + # TODO: Ideally we would use the upstream version, but that is broken due to not supporting fail_level + # https://github.com/EPMatt/reviewdog-action-prettier/issues/72 (the issue is misguided but might still be useful for trcacking) + uses: gcaracuel/reviewdog-action-prettier@ddacbf3caf877fd012b68601baa1903cde600bc7 + with: + fail_level: any + filter_mode: nofilter + reporter: github-check + workdir: ${{ inputs.subrepo }}