@@ -32,23 +32,13 @@ jobs:
3232 base :
3333 name : Base Tasks
3434 runs-on : ubuntu-latest
35- outputs :
36- turbo_args : ${{ steps.turborepo_arguments.outputs.turbo_args }}
3735
3836 steps :
3937 - name : Harden Runner
4038 uses : step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
4139 with :
4240 egress-policy : audit
4341
44- - name : Provide Turborepo Arguments
45- # This step is responsible for providing a reusable string that can be used within other steps and jobs
46- # that use the `turbo` cli command as a way of easily providing shared arguments to the `turbo` command
47- id : turborepo_arguments
48- # See https://turbo.build/repo/docs/reference/command-line-reference/run#--cache-dir
49- # See https://turbo.build/repo/docs/reference/command-line-reference/run#--force
50- run : echo "turbo_args=--force=true --cache-dir=.turbo/cache" >> "$GITHUB_OUTPUT"
51-
5242 lint :
5343 # This Job should run either on `merge_groups` or `push` events
5444 # or `pull_request_target` event with a `labeled` action with a label named `github_actions:pull-request`
6050 (github.event_name == 'pull_request_target' &&
6151 github.event.label.name == 'github_actions:pull-request')
6252
63- name : Lint
53+ name : Quality checks
6454 runs-on : ubuntu-latest
6555 needs : [base]
6656
@@ -116,8 +106,8 @@ jobs:
116106 # We also use `npm i` instead of `npm ci` so that the node_modules/.cache folder doesn't get deleted
117107 run : npm i --no-audit --no-fund --ignore-scripts --userconfig=/dev/null
118108
119- - name : Run `turbo lint `
120- id : eslint-step
109+ - name : Run quality checks with `turbo`
110+ id : quality-checks
121111 # We run the ESLint and Prettier commands on all Workflow triggers of the `Lint` job, besides if
122112 # the Pull Request comes from a Crowdin Branch, as we don't want to run ESLint and Prettier on Crowdin PRs
123113 # Note: Linting and Prettifying of files on Crowdin PRs is handled by the `translations-pr.yml` Workflow
@@ -127,13 +117,7 @@ jobs:
127117 github.event.pull_request.head.ref != 'chore/crowdin')
128118 # We want to enforce that the actual `turbo@latest` package is used instead of a possible hijack from the user
129119 # the `${{ needs.base.outputs.turbo_args }}` is a string substitution happening from the base job
130- run : npx --package=turbo@latest -- turbo lint ${{ needs.base.outputs.turbo_args }}
131-
132- - name : Run `turbo prettier`
133- if : steps.eslint-step.outcome == 'success'
134- # We want to enforce that the actual `turbo@latest` package is used instead of a possible hijack from the user
135- # the `${{ needs.base.outputs.turbo_args }}` is a string substitution happening from the base job
136- run : npx --package=turbo@latest -- turbo prettier ${{ needs.base.outputs.turbo_args }}
120+ run : npx --package=turbo@latest -- turbo lint:js lint:md lint:css prettier test:unit:ci --cache-dir=.turbo/cache
137121
138122 - name : Run `tsc build`
139123 # We want to ensure that the whole codebase is passing and successfully compiles with TypeScript
0 commit comments