@@ -104,6 +104,57 @@ jobs:
104
104
shell : " bash"
105
105
run : " tar -cf - .nx/cache | lz4 > /tmp/nx_cache.tar.lz4" # compress nx cache
106
106
107
+ attw :
108
+ if : " needs.files-changed.outputs.frontend_lintable == 'true'"
109
+ needs : " files-changed"
110
+ name : " Lint (are the types wrong)"
111
+ runs-on : " ubuntu-latest"
112
+ steps :
113
+ - name : " Harden Runner"
114
+ uses : " step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6" # v2.8.1
115
+ with :
116
+ egress-policy : " audit"
117
+
118
+ - name : " Git checkout ${{ env.HEAD_REPOSITORY }}:${{ env.HEAD_REF }}"
119
+ uses : " actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332" # v4.1.7
120
+ env :
121
+ GIT_COMMITTER_NAME : " GitHub Actions Shell"
122
+ GIT_AUTHOR_NAME : " GitHub Actions Shell"
123
+ EMAIL : " github-actions[bot]@users.noreply.github.com"
124
+ with :
125
+ # Number of commits to fetch. 0 indicates all history for all branches and tags.
126
+ # Pulls all commits (needed for NX)
127
+ fetch-depth : 0
128
+
129
+ - name : " Derive appropriate SHAs for base and head for `nx affected` commands"
130
+ id : " setSHAs"
131
+ uses : " nrwl/nx-set-shas@76907e7e5d3cd17ddb5e2b123389f054bffcdd03" # v4
132
+
133
+ - name : " Setup resources and environment"
134
+ id : " setup"
135
+ uses : " anolilab/workflows/step/setup@main"
136
+ with :
137
+ cache-prefix : " lint"
138
+
139
+ # Temporary solution until Nx solve this https://github.com/nrwl/nx/issues/22259
140
+ - name : " Get changed files"
141
+ id : " files"
142
+ uses : " tj-actions/changed-files@c65cd883420fd2eb864698a825fc4162dd94482c" # v44.5.7
143
+ with :
144
+ files_ignore_from_source_file : " .github/ignore-files-for-nx-affected.yml"
145
+ base_sha : " ${{ steps.setSHAs.outputs.base }}"
146
+ separator : " ,"
147
+
148
+ - name : " Build"
149
+ run : " pnpm run build:affected:packages --files=${{ steps.files.outputs.all_changed_files }}"
150
+
151
+ - name : " lint attw"
152
+ run : " pnpm run lint:affected:attw --files=${{ steps.files.outputs.all_changed_files }}"
153
+
154
+ - name : " Prepare nx cache"
155
+ shell : " bash"
156
+ run : " tar -cf - .nx/cache | lz4 > /tmp/nx_cache.tar.lz4" # compress nx cache
157
+
107
158
package-json-lint :
108
159
if : " needs.files-changed.outputs.package_json_lintable == 'true'"
109
160
needs : " files-changed"
@@ -303,7 +354,7 @@ jobs:
303
354
# It symbolizes that all required checks have successfully passed (Or skipped)
304
355
# This check is the only required GitHub check
305
356
test-required-check :
306
- needs : ["files-changed", "eslint", "yaml-lint", "package-json-lint"] # TODO add "markdown-lint"
357
+ needs : ["files-changed", "eslint", "attw", " yaml-lint", "package-json-lint"] # TODO add "markdown-lint"
307
358
name : " Check Lint Run"
308
359
# This is necessary since a failed/skipped dependent job would cause this job to be skipped
309
360
if : " always()"
0 commit comments