8000 chore: separate linting checks to their own step by bradzacher · Pull Request #1801 · typescript-eslint/typescript-eslint · GitHub
[go: up one dir, main page]

Skip to content

chore: separate linting checks to their own step #1801

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

Merged
merged 1 commit into from
Mar 30, 2020
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
3 changes: 2 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"**/**/ROADMAP.md",
"**/*.{json,snap}",
".cspell.json",
"yarn.lock"
"yarn.lock",
".github/workflows/**"
],
"dictionaries": [
"typescript",
Expand Down
50 changes: 39 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:

jobs:
primary_code_validation_and_tests:
name: Primary code validation and tests
name: Typecheck and tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -49,15 +49,6 @@ jobs:
- name: Typecheck all packages
run: yarn typecheck

- name: Check code formatting
run: yarn format-check

- name: Run linting
run: yarn lint

- name: Validate spelling
run: yarn check:spelling

- name: Run unit tests
run: yarn test
env:
Expand All @@ -71,6 +62,43 @@ jobs:
flags: unittest
name: codecov

linting_and_style:
name: Code style and lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.PRIMARY_NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

# This also runs a build as part of the postinstall bootstrap
- name: Install dependencies and build
run: |
yarn --ignore-engines --frozen-lockfile
yarn check-clean-workspace-after-install

- name: Check code formatting
run: yarn format-check

- name: Run linting
run: yarn lint

- name: Validate spelling
run: yarn check:spelling

integration_tests:
name: Run integration tests on primary Node.js version
runs-on: ubuntu-latest
Expand Down Expand Up @@ -143,7 +171,7 @@ jobs:
publish_canary_version:
name: Publish the latest code as a canary version
runs-on: ubuntu-latest
needs: [primary_code_validation_and_tests, unit_tests_on_other_node_versions, integration_tests]
needs: [primary_code_validation_and_tests, unit_tests_on_other_node_versions, linting_and_style, integration_tests]
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
Expand Down
0