From 5dc492d3d3e57abbc41c9f2cd9b1d9b042bc4b78 Mon Sep 17 00:00:00 2001 From: Churross Date: Fri, 16 May 2025 21:36:11 +0200 Subject: [PATCH 1/2] Parallelize build and test --- .github/workflows/unit-test.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index fc4a87e6..e0eb09e2 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -7,7 +7,7 @@ on: branches: [main] jobs: - build-and-test: + unit-test: runs-on: ubuntu-latest steps: @@ -17,4 +17,15 @@ jobs: uses: actions/setup-node@v3 - run: npm ci - run: npm test + + + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Node + uses: actions/setup-node@v3 + - run: npm ci - run : npm run build \ No newline at end of file From bc00c4ed63164b579d8191852efe18864bd87208 Mon Sep 17 00:00:00 2001 From: Churross Date: Fri, 16 May 2025 21:49:21 +0200 Subject: [PATCH 2/2] Add caching to workflow --- .github/workflows/unit-test.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index e0eb09e2..b9eb4a47 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -15,6 +15,11 @@ jobs: uses: actions/checkout@v3 - name: Setup Node uses: actions/setup-node@v3 + - uses: actions/cache@v3 + id: npm-cache + with: + path: ~/.npm + key: npm-${{ hashFiles('**/package-lock.json') }} - run: npm ci - run: npm test @@ -27,5 +32,10 @@ jobs: uses: actions/checkout@v3 - name: Setup Node uses: actions/setup-node@v3 + - uses: actions/cache@v3 + id: npm-cache + with: + path: ~/.npm + key: npm-${{ hashFiles('**/package-lock.json') }} - run: npm ci - run : npm run build \ No newline at end of file