2021-04-11 01:09:09 +03:00
|
|
|
# Copyright 2019-2021 Tauri Programme within The Commons Conservancy
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
2022-02-14 00:21:15 +03:00
|
|
|
name: api and cli.js lint check
|
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:
|
|
|
|
group: ${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2020-07-15 14:14:11 +03:00
|
|
|
jobs:
|
|
|
|
eslint-check:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-10-22 17:33:02 +03:00
|
|
|
- uses: actions/setup-node@v2
|
2020-08-19 05:36:46 +03:00
|
|
|
with:
|
2022-02-10 04:11:00 +03:00
|
|
|
node-version: '12'
|
2021-10-22 17:33:02 +03:00
|
|
|
cache: yarn
|
|
|
|
cache-dependency-path: tooling/*/yarn.lock
|
2021-04-23 07:34:54 +03:00
|
|
|
- name: install cli.js 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
|
|
|
|
#- name: run cli.js 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
|
2021-04-23 07:34:54 +03:00
|
|
|
- name: run cli.js 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
|
|
|
|
|
|
|
- name: install api deps via yarn
|
|
|
|
working-directory: ./tooling/api/
|
|
|
|
run: yarn
|
|
|
|
- name: run api lint
|
|
|
|
working-directory: ./tooling/api/
|
|
|
|
run: yarn lint
|
|
|
|
- name: run api format
|
|
|
|
working-directory: ./tooling/api/
|
|
|
|
run: yarn format:check
|