diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a9cceff2..5ff10dff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,21 +9,17 @@ jobs: name: Build and run tests steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + + - name: setup node.je + uses: actions/setup-node@v4 with: - node-version: 20 - - name: Cache node modules - uses: actions/cache@v4 - env: - cache-name: cache-node-modules - path: ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- + node-version: 20 + cache: 'npm' - - name: npm install and npm run CI commands + - name: npm install, build, test, lint run: | - npm i - npm run build \ No newline at end of file + npm ci + npm run build + npm run test + npm run lint \ No newline at end of file diff --git a/package.json b/package.json index 11df5930..012c3cd4 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "start": "concurrently \"nx serve server-asset-sg\" \"nx serve client-asset-sg --disableHostCheck=true\"", "build": "concurrently \"nx build server-asset-sg\" \"nx build client-asset-sg\"", "test": "nx run-many --target=test --all", + "lint": "nx run-many --target=lint --all", "postinstall": "node ./decorate-angular-cli.js" }, "private": true,