2024-03-01 14:29:01 +03:00
|
|
|
# Copyright 2019-2024 Tauri Programme within The Commons Conservancy
|
2021-04-11 01:09:09 +03:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
2023-05-22 18:52:44 +03:00
|
|
|
name: lint js
|
2020-07-15 14:14:11 +03:00
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
2022-02-14 00:21:15 +03:00
|
|
|
- '.github/workflows/lint-js.yml'
|
2022-02-10 23:23:10 +03:00
|
|
|
- 'tooling/cli/node/**'
|
2022-02-10 04:11:00 +03:00
|
|
|
- 'tooling/api/**'
|
2020-07-15 14:14:11 +03:00
|
|
|
|
2022-04-21 21:09:57 +03:00
|
|
|
concurrency:
|
2022-04-27 01:04:10 +03:00
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
2022-04-21 21:09:57 +03:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
2020-07-15 14:14:11 +03:00
|
|
|
jobs:
|
2023-05-22 18:52:44 +03:00
|
|
|
eslint-cli:
|
2020-07-15 14:14:11 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-09 16:38:19 +03:00
|
|
|
- uses: actions/checkout@v4
|
2023-10-24 00:22:00 +03:00
|
|
|
- uses: actions/setup-node@v3
|
2020-08-19 05:36:46 +03:00
|
|
|
with:
|
2023-10-18 16:37:30 +03:00
|
|
|
node-version: '18'
|
2021-10-22 17:33:02 +03:00
|
|
|
cache: yarn
|
2023-05-22 18:52:44 +03:00
|
|
|
cache-dependency-path: tooling/cli/node/yarn.lock
|
|
|
|
- name: install deps via yarn
|
2022-02-10 23:23:10 +03:00
|
|
|
working-directory: ./tooling/cli/node/
|
2020-07-15 14:14:11 +03:00
|
|
|
run: yarn
|
2022-02-10 04:11:00 +03:00
|
|
|
# nothing to lint
|
2023-05-22 18:52:44 +03:00
|
|
|
#- name: run lint
|
2022-02-10 23:23:10 +03:00
|
|
|
# working-directory: ./tooling/cli/node/
|
2022-02-10 04:11:00 +03:00
|
|
|
# run: yarn lint
|
2023-05-22 18:52:44 +03:00
|
|
|
- name: run format
|
2022-02-10 23:23:10 +03:00
|
|
|
working-directory: ./tooling/cli/node/
|
2020-08-19 05:36:46 +03:00
|
|
|
run: yarn format:check
|
2021-04-23 07:34:54 +03:00
|
|
|
|
2023-05-22 18:52:44 +03:00
|
|
|
eslint-api:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-09 16:38:19 +03:00
|
|
|
- uses: actions/checkout@v4
|
2023-10-24 00:22:00 +03:00
|
|
|
- uses: actions/setup-node@v3
|
2023-05-22 18:52:44 +03:00
|
|
|
with:
|
2023-10-18 16:37:30 +03:00
|
|
|
node-version: '18'
|
2023-05-22 18:52:44 +03:00
|
|
|
cache: yarn
|
|
|
|
cache-dependency-path: tooling/api/yarn.lock
|
|
|
|
|
|
|
|
- name: install deps via yarn
|
2021-04-23 07:34:54 +03:00
|
|
|
working-directory: ./tooling/api/
|
|
|
|
run: yarn
|
2023-11-19 14:38:24 +03:00
|
|
|
- name: run ts:check
|
|
|
|
working-directory: ./tooling/api/
|
|
|
|
run: yarn ts:check
|
2023-05-22 18:52:44 +03:00
|
|
|
- name: run lint
|
2021-04-23 07:34:54 +03:00
|
|
|
working-directory: ./tooling/api/
|
|
|
|
run: yarn lint
|
2023-05-22 18:52:44 +03:00
|
|
|
- name: run format
|
2021-04-23 07:34:54 +03:00
|
|
|
working-directory: ./tooling/api/
|
|
|
|
run: yarn format:check
|