From 60e98f67bcdaabc59b26ab5890732949c724d831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alper=20K=C4=B1l=C4=B1=C3=A7kaya?= <48261006+alperkilickaya@users.noreply.github.com> Date: Tue, 14 Jan 2025 00:56:33 +0100 Subject: [PATCH 1/2] cache added to test --- .github/workflows/test.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3f8bdbb..f210655 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,7 +21,17 @@ jobs: node-version: "18" cache: "npm" + - name: Cache node modules + uses: actions/cache@v3 + id: npm-cache + with: + path: node_modules + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - name: Install dependencies + if: steps.npm-cache.outputs.cache-hit != 'true' run: npm ci - name: Run tests with coverage From 5182684697546ad82a8cb0fab9c83f62123191fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alper=20K=C4=B1l=C4=B1=C3=A7kaya?= <48261006+alperkilickaya@users.noreply.github.com> Date: Tue, 14 Jan 2025 01:09:22 +0100 Subject: [PATCH 2/2] getcode cached --- .github/workflows/test.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f210655..b979374 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,12 +8,14 @@ on: workflow_dispatch: jobs: - test: - name: Unit Test + test-and-scan: + name: Test and Security Scan runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Setup Node.js uses: actions/setup-node@v3 @@ -43,16 +45,6 @@ jobs: name: coverage-report path: coverage/ - security-scan: - name: Security Scan - runs-on: ubuntu-latest - needs: test - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Gitleaks uses: gitleaks/gitleaks-action@v2 env: