Skip to content

Commit

Permalink
ci: consolidate lint job
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Jul 18, 2023
1 parent 19c3475 commit 5b0f61f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 48 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/* eslint-env node */
const process = require('process');

// we don't collect type info by default because the EXPERIMENTAL_useProjectService that provides viable perf
// is not yet compatible with running eslint in IDE
const lintTypes = !!process.env.AGORIC_ESLINT_TYPES;

const deprecatedForLoanContract = [
Expand Down Expand Up @@ -36,7 +38,7 @@ module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: lintTypes
? {
// this is not yet compatible with eslint lsp so it's conditioned on AGORIC_ESLINT_TYPES
// this is not yet compatible with eslint lsp so it's contingent on AGORIC_ESLINT_TYPES
EXPERIMENTAL_useProjectService: true,
sourceType: 'module',
project: [
Expand Down
22 changes: 2 additions & 20 deletions .github/workflows/test-all-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
# We run per package bc of https://github.com/typescript-eslint/typescript-eslint/issues/1192
# We split the package tests into two jobs because type linting
# is inefficient and slow https://github.com/typescript-eslint/typescript-eslint/issues/2094
lint-primary:
lint:
timeout-minutes: 10
needs: build
runs-on: ubuntu-latest
Expand All @@ -66,25 +66,7 @@ jobs:
with:
node-version: '18.x'

# first job also does repo-level linting
- name: lint repo format
run: yarn lint:format
# eslint
- name: yarn lint primary
run: ./scripts/lint-with-types.sh primary

lint-rest:
timeout-minutes: 10
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/restore-node
with:
node-version: '18.x'

- name: yarn lint rest
run: ./scripts/lint-with-types.sh rest
- run: yarn lint

##################
# Fast-running tests run as a group:
Expand Down
27 changes: 0 additions & 27 deletions scripts/lint-with-types.sh

This file was deleted.

0 comments on commit 5b0f61f

Please sign in to comment.