Skip to content

Commit 92d7962

Browse files
Refactor GitHub Actions workflow for improved readability and consistency
1 parent cfc9afc commit 92d7962

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

.github/workflows/node.js.yml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,15 @@
22
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
33

44
name: Node.js CI
5-
env:
6-
GITHUB_TOKEN: ${{secrets.PERSONAL_GITHUB_TOKEN}}
75

86
on:
97
push:
10-
branches: [ "master" ]
8+
branches: ["master"]
119
pull_request:
12-
branches: [ "master" ]
10+
branches: ["master"]
1311

1412
jobs:
1513
build:
16-
1714
runs-on: ubuntu-latest
1815

1916
strategy:
@@ -22,13 +19,12 @@ jobs:
2219
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2320

2421
steps:
25-
- uses: actions/checkout@v3
26-
- name: Use Node.js ${{ matrix.node-version }}
27-
uses: actions/setup-node@v3
28-
with:
29-
node-version: ${{ matrix.node-version }}
30-
cache: 'npm'
31-
- run: mv .npmrc.githubactions .npmrc
32-
- run: npm ci
33-
- run: npm run build --if-present
34-
- run: npm test
22+
- uses: actions/checkout@v3
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
cache: "npm"
28+
- run: npm ci
29+
- run: npm run build --if-present
30+
- run: npm test

0 commit comments

Comments
 (0)