Skip to content

Commit 8d3cf30

Browse files
committed
add lint and index-required jobs
1 parent 5935dac commit 8d3cf30

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

‎.github/workflows/index.yaml‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ on:
33
push:
44

55
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v7
10+
- uses: actions/setup-node@v7
11+
with:
12+
node-version-file: package.json
13+
- run: npm install
14+
- run: npm run lint
15+
616
test:
717
runs-on: ubuntu-latest
818
strategy:
@@ -15,7 +25,6 @@ jobs:
1525
with:
1626
node-version: ${{ matrix.node }}
1727
- run: npm install
18-
- run: npm run lint
1928
- run: npm run build
2029
- run: npm run test
2130
- name: module test
@@ -26,3 +35,12 @@ jobs:
2635
- uses: coverallsapp/github-action@master
2736
with:
2837
github-token: ${{ secrets.GITHUB_TOKEN }}
38+
39+
index-required:
40+
if: ${{ !cancelled() }}
41+
needs: [lint, test]
42+
runs-on: ubuntu-latest
43+
permissions: {}
44+
steps:
45+
- if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
46+
run: exit 1

0 commit comments

Comments
 (0)