fixup!: move lint-sh to scripts.yaml
This commit is contained in:
parent
c57dfe5131
commit
5a6d4862fb
44
.github/workflows/build.yaml
vendored
44
.github/workflows/build.yaml
vendored
@ -88,50 +88,6 @@ jobs:
|
|||||||
if: failure()
|
if: failure()
|
||||||
uses: andymckay/cancel-action@0.2
|
uses: andymckay/cancel-action@0.2
|
||||||
|
|
||||||
lint-sh:
|
|
||||||
name: Lint shell files
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 5
|
|
||||||
steps:
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Get changed files
|
|
||||||
id: changed-files
|
|
||||||
uses: tj-actions/changed-files@v23.2
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
**/*.sh
|
|
||||||
**/*.bats
|
|
||||||
|
|
||||||
- name: Install Node.js v16
|
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: "16"
|
|
||||||
|
|
||||||
- name: Fetch dependencies from cache
|
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
|
||||||
id: cache-node-modules
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: "**/node_modules"
|
|
||||||
key: yarn-build-${{ hashFiles('**yarn.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
yarn-build-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
if: steps.changed-files.outputs.any_changed == 'true' && steps.cache-node-modules.outputs.cache-hit != 'true'
|
|
||||||
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
|
|
||||||
|
|
||||||
- name: Lint shell files
|
|
||||||
if: steps.changed-files.outputs.any_changed == 'true'
|
|
||||||
run: yarn lint:sh
|
|
||||||
|
|
||||||
- name: Fail workflow
|
|
||||||
if: failure()
|
|
||||||
uses: andymckay/cancel-action@0.2
|
|
||||||
|
|
||||||
lint-ts:
|
lint-ts:
|
||||||
name: Lint TypeScript files
|
name: Lint TypeScript files
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
28
.github/workflows/scripts.yaml
vendored
28
.github/workflows/scripts.yaml
vendored
@ -51,3 +51,31 @@ jobs:
|
|||||||
|
|
||||||
- name: Run script unit tests
|
- name: Run script unit tests
|
||||||
run: ./ci/dev/test-scripts.sh
|
run: ./ci/dev/test-scripts.sh
|
||||||
|
lint:
|
||||||
|
name: Lint shell files
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 5
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install Node.js v16
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: "16"
|
||||||
|
|
||||||
|
- name: Fetch dependencies from cache
|
||||||
|
id: cache-node-modules
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: "**/node_modules"
|
||||||
|
key: yarn-build-${{ hashFiles('**yarn.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
yarn-build-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
||||||
|
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Lint shell files
|
||||||
|
run: yarn lint:sh
|
||||||
|
Reference in New Issue
Block a user