Skip to content

Commit

Permalink
Merge pull request #840 from embroider-build/lint-before-running-many…
Browse files Browse the repository at this point in the history
…-jobs

Run linting in CI before running the full matrix of jobs
  • Loading branch information
rwjblue authored Jun 10, 2021
2 parents 9cd5f80 + 10c6f7c commit 08500d6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
24 changes: 23 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,30 @@ on:
branches: [master]

jobs:
linting:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v1
- uses: volta-cli/action@v1
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn --frozen-lockfile
- name: lint
run: yarn lint

discover_matrix:
runs-on: ubuntu-latest
timeout-minutes: 10
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
Expand All @@ -36,7 +58,7 @@ jobs:
run: echo "::set-output name=matrix::$(node ./test-packages/support/suite-setup-util.js --matrix)"

test:
needs: discover_matrix
needs: ["discover_matrix", "linting"]
name: ${{ matrix.name }}
runs-on: '${{ matrix.os }}-latest'
timeout-minutes: 30
Expand Down
7 changes: 0 additions & 7 deletions test-packages/support/suite-setup-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,6 @@ export async function githubMatrix() {
});

let include = [
// add our eslint
{
name: 'lint',
os: 'ubuntu',
command: 'yarn lint',
dir: resolve(__dirname, '..', '..'),
},
...suites.map(s => ({
name: `${s.name} ubuntu`,
os: 'ubuntu',
Expand Down

0 comments on commit 08500d6

Please sign in to comment.