diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8559b42..8bdc8d9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,7 @@ jobs: name: Build Stage runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.pull_request.title, '[skip ci]') && !contains(github.event.pull_request.title, '[ci skip]')" - timeout-minutes: 40 + timeout-minutes: 10 env: NODE_VERSION: 20.15.0 SPRING_OUTPUT_ANSI_ENABLED: DETECT @@ -25,6 +25,13 @@ jobs: java-version: 17 - name: Install Node.js packages run: npm install + - name: Cache Node.js dependencies + uses: actions/cache@v3 + with: + path: node_modules + key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- - name: Package application run: npm run java:jar:prod @@ -52,8 +59,6 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 20.15.0 - - name: Install Node.js packages - run: npm install - name: Run frontend test run: npm run ci:frontend:test sonar: @@ -114,8 +119,6 @@ jobs: uses: actions/setup-node@v4 with: node-version: 20.15.0 - - name: Install Node.js packages - run: npm install - name: Install ESLint run: npm install eslint --save-dev @@ -135,9 +138,6 @@ jobs: name: DAST OWASP ZAP Scans runs-on: ubuntu-latest needs: [backend-test, frontend-test] - strategy: - matrix: - node-version: [20.x] steps: - uses: actions/checkout@v4 - name: Change script permission @@ -146,7 +146,7 @@ jobs: - name: ZAP scan run: script/zap-script.sh - name: Archive production artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: zap report path: |