Skip to content

Commit fc3d8a3

Browse files
authored
Merge pull request #528 from twilio-labs/bnb/update-node-ci
ci: clean up the Node.js CI GitHub Action
2 parents bda1dd1 + d048872 commit fc3d8a3

File tree

1 file changed

+14
-30
lines changed

1 file changed

+14
-30
lines changed

.github/workflows/nodejs.yml

Lines changed: 14 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Node.js CI
1+
name: Build, Test, Lint, Format (Node.js)
22

33
on: [pull_request]
44

@@ -16,42 +16,26 @@ jobs:
1616
uses: actions/setup-node@v3
1717
with:
1818
node-version: ${{ matrix.node-version }}
19-
# - name: Cache node modules
20-
# uses: actions/cache@v1
21-
# with:
22-
# path: node_modules
23-
# key: ${{ matrix.os }}-${{ matrix.node-version }}-build-${{ hashFiles('**/package-lock.json') }}
24-
# restore-keys: |
25-
# ${{ matrix.os }}-${{ matrix.node-version }}-build-${{ env.cache-name }}-
26-
# ${{ matrix.os }}-${{ matrix.node-version }}-build-
27-
# ${{ matrix.os }}-${{ matrix.node-version }}-
28-
# - name: Cache Cypress
29-
# uses: actions/cache@v1
30-
# with:
31-
# path: /home/runner/.cache/Cypress
32-
# key: ${{ matrix.os }}-${{ matrix.node-version }}-cypress-${{ hashFiles('**/package-lock.json') }}
33-
# restore-keys: |
34-
# ${{ matrix.os }}-${{ matrix.node-version }}-cypress-${{ env.cache-name }}-
35-
# ${{ matrix.os }}-${{ matrix.node-version }}-cypress-
36-
# ${{ matrix.os }}-${{ matrix.node-version }}-
3719
- name: install latest npm
38-
run: |
39-
npm install -g npm@latest
40-
- name: npm install, build, and test
41-
run: |
42-
npm install
43-
npm run build --if-present
44-
npm test
20+
run: npm install -g npm@latest
21+
- name: npm install
22+
run: npm install
4523
env:
4624
CI: true
47-
- name: check formatting
48-
if: always()
25+
- name: npm run build --if-present
26+
run: npm run build --if-present
27+
env:
28+
CI: true
29+
- name: npm test
30+
run: npm test
31+
env:
32+
CI: true
33+
- name: npm run format:check
4934
run: npm run format:check
5035
env:
5136
CI: true
5237
NODE_ENV: test
53-
- name: lint
54-
if: always()
38+
- name: npm run lint
5539
run: npm run lint
5640
env:
5741
CI: true

0 commit comments

Comments
 (0)