Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run linting in CI before running the full matrix of jobs #840

Merged
merged 1 commit into from
Jun 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,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 @@ -33,11 +55,11 @@ 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

strategy:
fail-fast: false
matrix: ${{fromJson(needs.discover_matrix.outputs.matrix)}}
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