diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 62b713e73def..e26addc89fd1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -165,8 +165,7 @@ jobs: runs-on: ubuntu-20.04 timeout-minutes: 15 if: | - (needs.job_get_metadata.outputs.is_gitflow_sync == 'false' && needs.job_get_metadata.outputs.has_gitflow_label == 'false') && - (needs.job_get_metadata.outputs.changed_any_code == 'true' || github.event_name != 'pull_request') + (needs.job_get_metadata.outputs.is_gitflow_sync == 'false' && needs.job_get_metadata.outputs.has_gitflow_label == 'false') steps: - name: 'Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})' uses: actions/checkout@v4 @@ -215,6 +214,8 @@ jobs: needs: [job_get_metadata, job_install_deps] runs-on: ubuntu-20.04 timeout-minutes: 30 + if: | + (needs.job_get_metadata.outputs.changed_any_code == 'true' || github.event_name != 'pull_request') steps: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) uses: actions/checkout@v4 @@ -319,10 +320,33 @@ jobs: env: DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }} - name: Lint source files - run: yarn lint + run: yarn lint:lerna - name: Validate ES5 builds run: yarn validate:es5 + job_check_format: + name: Check file formatting + needs: [job_get_metadata, job_install_deps] + timeout-minutes: 10 + runs-on: ubuntu-20.04 + steps: + - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) + uses: actions/checkout@v4 + with: + ref: ${{ env.HEAD_COMMIT }} + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version-file: 'package.json' + - name: Check dependency cache + uses: actions/cache/restore@v3 + with: + path: ${{ env.CACHED_DEPENDENCY_PATHS }} + key: ${{ needs.job_install_deps.outputs.dependency_cache_key }} + fail-on-cache-miss: true + - name: Check file formatting + run: yarn lint:prettier && yarn lint:biome + job_circular_dep_check: name: Circular Dependency Check needs: [job_get_metadata, job_build] @@ -1015,6 +1039,7 @@ jobs: job_e2e_tests, job_artifacts, job_lint, + job_check_format, job_circular_dep_check, ] # Always run this, even if a dependent job failed