Merge pull request #15102 from nsoranzo/js_lint_github_wf

Move JavaScript linting to GitHub workflows
This commit is contained in:
Dannon
2022-12-02 11:43:24 -05:00
committed by GitHub
2 changed files with 35 additions and 22 deletions
-22
View File
@@ -5,16 +5,6 @@ variables:
restore_cache:
keys:
- v1-repo-{{ .Environment.CIRCLE_SHA1 }}
restore_yarn_cache: &restore_yarn_cache
restore_cache:
keys:
- v1-repo-{{ .Environment.CIRCLE_SHA1 }}
- yarn-packages-{{ checksum "client/yarn.lock" }}
save_yarn_cache: &save_yarn_cache
save_cache:
key: yarn-packages-{{ checksum "client/yarn.lock" }}
paths:
- ~/.cache/yarn
install_tox: &install_tox
run: pip install tox
set_workdir: &set_workdir
@@ -91,16 +81,6 @@ jobs:
- run: sudo apt-get install -y libxml2-utils
- *install_tox
- run: tox -e validate_test_tools
js_lint:
docker:
- image: cimg/node:16.15.1
<<: *set_workdir
steps:
- *restore_yarn_cache
- run: cd client && yarn install --frozen-lockfile
- *save_yarn_cache
- run: cd client && yarn run eslint
- run: cd client && yarn run format-check
workflows:
version: 2
get_code_and_test:
@@ -108,5 +88,3 @@ workflows:
- get_code
- validate_test_tools:
<<: *requires_get_code
- js_lint:
<<: *requires_get_code
+35
View File
@@ -0,0 +1,35 @@
name: Client linting
on:
push:
paths:
- 'client/**'
- '.github/workflows/js_lint.yaml'
pull_request:
paths:
- 'client/**'
- '.github/workflows/js_lint.yaml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
client-unit-test:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16]
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node}}
cache: 'yarn'
cache-dependency-path: 'client/yarn.lock'
- run: yarn install --frozen-lockfile
working-directory: client
- name: Run ESLint
run: yarn run eslint
working-directory: client
- name: Run prettier checks
run: yarn run format-check
working-directory: client