Skip to content

Commit 18d631a

Browse files
committed
simplify ci job
1 parent c887732 commit 18d631a

File tree

1 file changed

+18
-29
lines changed

1 file changed

+18
-29
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,22 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v4
15-
16-
- name: Cache node modules
17-
id: cache-npm
18-
uses: actions/cache@v3
19-
20-
env:
21-
cache-name: cache-node-modules
14+
# Check out the source
15+
- name: Checkout Source
16+
uses: actions/checkout@v4
17+
# Setup node.js, Install and Build App
18+
- name: "Setup node.js"
19+
uses: actions/setup-node@v4
2220
with:
23-
# npm cache files are stored in `~/.npm` on Linux/macOS
24-
path: ~/.npm
25-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
26-
restore-keys: |
27-
${{ runner.os }}-build-${{ env.cache-name }}-
28-
${{ runner.os }}-build-
29-
${{ runner.os }}-
30-
31-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
32-
name: List the state of node modules
33-
continue-on-error: true
34-
run: npm list
35-
36-
- name: NPM install
37-
run: npm install
38-
39-
- name: Build
40-
run: npm run build
41-
42-
- name: Lint & Format
43-
run: npm run lint:ci
21+
node-version: "18.x"
22+
cache: 'npm'
23+
cache-dependency-path: ./package-lock.json
24+
# Install dependencies
25+
- name: Install dependencies
26+
run: npm ci
27+
# Lint App
28+
- name: Lint App
29+
run: npm run lint -
30+
# Build App
31+
- name: Build App
32+
run: npm run build

0 commit comments

Comments
 (0)