Skip to content

Commit 5a6d486

Browse files
committed
fixup!: move lint-sh to scripts.yaml
1 parent c57dfe5 commit 5a6d486

File tree

2 files changed

+28
-44
lines changed

2 files changed

+28
-44
lines changed

.github/workflows/build.yaml

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -88,50 +88,6 @@ jobs:
8888
if: failure()
8989
uses: andymckay/[email protected]
9090

91-
lint-sh:
92-
name: Lint shell files
93-
runs-on: ubuntu-latest
94-
timeout-minutes: 5
95-
steps:
96-
- name: Checkout repo
97-
uses: actions/checkout@v3
98-
99-
- name: Get changed files
100-
id: changed-files
101-
uses: tj-actions/[email protected]
102-
with:
103-
files: |
104-
**/*.sh
105-
**/*.bats
106-
107-
- name: Install Node.js v16
108-
if: steps.changed-files.outputs.any_changed == 'true'
109-
uses: actions/setup-node@v3
110-
with:
111-
node-version: "16"
112-
113-
- name: Fetch dependencies from cache
114-
if: steps.changed-files.outputs.any_changed == 'true'
115-
id: cache-node-modules
116-
uses: actions/cache@v3
117-
with:
118-
path: "**/node_modules"
119-
key: yarn-build-${{ hashFiles('**yarn.lock') }}
120-
restore-keys: |
121-
yarn-build-
122-
123-
- name: Install dependencies
124-
if: steps.changed-files.outputs.any_changed == 'true' && steps.cache-node-modules.outputs.cache-hit != 'true'
125-
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
126-
127-
- name: Lint shell files
128-
if: steps.changed-files.outputs.any_changed == 'true'
129-
run: yarn lint:sh
130-
131-
- name: Fail workflow
132-
if: failure()
133-
uses: andymckay/[email protected]
134-
13591
lint-ts:
13692
name: Lint TypeScript files
13793
runs-on: ubuntu-latest

.github/workflows/scripts.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,31 @@ jobs:
5151

5252
- name: Run script unit tests
5353
run: ./ci/dev/test-scripts.sh
54+
lint:
55+
name: Lint shell files
56+
runs-on: ubuntu-latest
57+
timeout-minutes: 5
58+
steps:
59+
- name: Checkout repo
60+
uses: actions/checkout@v3
61+
62+
- name: Install Node.js v16
63+
uses: actions/setup-node@v3
64+
with:
65+
node-version: "16"
66+
67+
- name: Fetch dependencies from cache
68+
id: cache-node-modules
69+
uses: actions/cache@v3
70+
with:
71+
path: "**/node_modules"
72+
key: yarn-build-${{ hashFiles('**yarn.lock') }}
73+
restore-keys: |
74+
yarn-build-
75+
76+
- name: Install dependencies
77+
if: steps.cache-node-modules.outputs.cache-hit != 'true'
78+
run: SKIP_SUBMODULE_DEPS=1 yarn --frozen-lockfile
79+
80+
- name: Lint shell files
81+
run: yarn lint:sh

0 commit comments

Comments
 (0)