From 69dbcf17a26965042eab1209cabeab3aa8042a23 Mon Sep 17 00:00:00 2001 From: Maribeth Bottorff Date: Mon, 19 Jul 2021 18:14:23 -0700 Subject: [PATCH] Only lint once in CI (#5128) --- .github/workflows/build.yml | 16 ++++++++++++++++ tests/run_all_tests.sh | 5 ++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f00730990..9a7d2b859 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,3 +41,19 @@ jobs: env: CI: true + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Use Node.js 16.x + uses: actions/setup-node@v1 + with: + node-version: 16.x + + - name: Npm Install + run: npm install + + - name: Lint + run: npm run lint diff --git a/tests/run_all_tests.sh b/tests/run_all_tests.sh index f6c7c0f8c..ccb18cf9c 100755 --- a/tests/run_all_tests.sh +++ b/tests/run_all_tests.sh @@ -49,7 +49,10 @@ run_test_command () { } # Lint the codebase. -run_test_command "eslint" "eslint ." +# Skip for CI environments, because linting is run separately. +if [ -z $CI ]; then + run_test_command "eslint" "eslint ." +fi # Run the full usual build process. run_test_command "build" "npm run build"