From 96bce3722c9b008210e1105d748c8b7c4cc0985f Mon Sep 17 00:00:00 2001 From: pcheremu Date: Wed, 8 Nov 2023 14:04:14 +0100 Subject: [PATCH 1/9] test: fix git runner and test issues --- .github/workflows/app-e2e.yml | 18 +++++------------- .github/workflows/release.yml | 2 +- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/.github/workflows/app-e2e.yml b/.github/workflows/app-e2e.yml index 42842c52cd..f9b5416559 100644 --- a/.github/workflows/app-e2e.yml +++ b/.github/workflows/app-e2e.yml @@ -33,7 +33,7 @@ env: jobs: e2e: - runs-on: [self-hosted, ci-runner] + runs-on: [matterlabs-ci-runner] permissions: contents: read defaults: @@ -64,22 +64,14 @@ jobs: with: fetch-depth: 0 - - name: Cache node modules - id: cache-nodemodules - uses: actions/cache@v3 - env: - cache-name: cache-node-modules + - name: Setup Node.js + uses: actions/setup-node@v3 with: - path: node_modules - 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: '18' + cache: 'npm' - name: Install dependencies working-directory: ./ - if: steps.cache-nodemodules.outputs.cache-hit != 'true' run: | npm pkg delete scripts.prepare npm ci diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 441cab4269..4c9060f634 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,7 +55,7 @@ jobs: deployBackendToStaging: name: Deploy Block Explorer backend to staging - runs-on: [self-hosted, ci-runner] + runs-on: [matterlabs-ci-runner] permissions: contents: read needs: createReleaseVersion From cf1859800d07ac5b9c54701ab4374d7898580387 Mon Sep 17 00:00:00 2001 From: pcheremu Date: Thu, 9 Nov 2023 01:07:05 +0100 Subject: [PATCH 2/9] test: test with a cache --- .github/workflows/app-deploy-feature-branch.yml | 8 ++++---- .github/workflows/app-e2e.yml | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/app-deploy-feature-branch.yml b/.github/workflows/app-deploy-feature-branch.yml index 5b862b4edd..7801779b65 100644 --- a/.github/workflows/app-deploy-feature-branch.yml +++ b/.github/workflows/app-deploy-feature-branch.yml @@ -36,11 +36,11 @@ jobs: run: | npm run lint -- --no-fix --max-warnings 0 - - name: Test - run: npm run test:ci + # - name: Test + # run: npm run test:ci - - name: Type check - run: npm run typecheck + # - name: Type check + # run: npm run typecheck - name: Build run: | diff --git a/.github/workflows/app-e2e.yml b/.github/workflows/app-e2e.yml index f9b5416559..114499f4bc 100644 --- a/.github/workflows/app-e2e.yml +++ b/.github/workflows/app-e2e.yml @@ -70,8 +70,24 @@ jobs: node-version: '18' cache: 'npm' + - name: Cache node modules + id: cache-nodemodules + uses: actions/cache@v3 + env: + cache-name: cache-node-modules + # Workaround for bug https://github.com/typicode/husky/issues/991 + HUSKY: 0 + with: + path: node_modules + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: Install dependencies working-directory: ./ + if: steps.cache-nodemodules.outputs.cache-hit != 'true' run: | npm pkg delete scripts.prepare npm ci From d15df2c358b78c2dee73d713a9b745fe63bb7b85 Mon Sep 17 00:00:00 2001 From: pcheremu Date: Thu, 9 Nov 2023 01:42:23 +0100 Subject: [PATCH 3/9] test: test with a node --- .github/workflows/app-e2e.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/app-e2e.yml b/.github/workflows/app-e2e.yml index 114499f4bc..7642608e40 100644 --- a/.github/workflows/app-e2e.yml +++ b/.github/workflows/app-e2e.yml @@ -64,11 +64,11 @@ jobs: with: fetch-depth: 0 - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: '18' - cache: 'npm' + # - name: Setup Node.js + # uses: actions/setup-node@v3 + # with: + # node-version: '18' + # cache: 'npm' - name: Cache node modules id: cache-nodemodules From 43ba8464453131a3c71b08b89ddd5d28fa3259d4 Mon Sep 17 00:00:00 2001 From: pcheremu Date: Thu, 9 Nov 2023 01:55:33 +0100 Subject: [PATCH 4/9] test: test with a cleaned cache in advance --- .github/workflows/app-deploy-feature-branch.yml | 8 ++++---- .github/workflows/app-e2e.yml | 6 ------ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/app-deploy-feature-branch.yml b/.github/workflows/app-deploy-feature-branch.yml index 7801779b65..5b862b4edd 100644 --- a/.github/workflows/app-deploy-feature-branch.yml +++ b/.github/workflows/app-deploy-feature-branch.yml @@ -36,11 +36,11 @@ jobs: run: | npm run lint -- --no-fix --max-warnings 0 - # - name: Test - # run: npm run test:ci + - name: Test + run: npm run test:ci - # - name: Type check - # run: npm run typecheck + - name: Type check + run: npm run typecheck - name: Build run: | diff --git a/.github/workflows/app-e2e.yml b/.github/workflows/app-e2e.yml index 7642608e40..6ea8d996c5 100644 --- a/.github/workflows/app-e2e.yml +++ b/.github/workflows/app-e2e.yml @@ -64,12 +64,6 @@ jobs: with: fetch-depth: 0 - # - name: Setup Node.js - # uses: actions/setup-node@v3 - # with: - # node-version: '18' - # cache: 'npm' - - name: Cache node modules id: cache-nodemodules uses: actions/cache@v3 From 9c990c09669857ccac369739777397579b6c8a02 Mon Sep 17 00:00:00 2001 From: pcheremu Date: Thu, 9 Nov 2023 02:08:27 +0100 Subject: [PATCH 5/9] test: test with a node --- .github/workflows/app-e2e.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/app-e2e.yml b/.github/workflows/app-e2e.yml index 6ea8d996c5..51cde34503 100644 --- a/.github/workflows/app-e2e.yml +++ b/.github/workflows/app-e2e.yml @@ -57,13 +57,19 @@ jobs: name: '${{ matrix.tags }}' container: - image: mcr.microsoft.com/playwright:v1.27.0-focal + image: mcr.microsoft.com/playwright:v1.39.0-jammy options: --user root steps: - uses: actions/checkout@v3 with: fetch-depth: 0 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + cache: 'npm' + - name: Cache node modules id: cache-nodemodules uses: actions/cache@v3 From 3b0693e2c295877b98c51b3909ab05a99a2d2de0 Mon Sep 17 00:00:00 2001 From: pcheremu Date: Thu, 9 Nov 2023 02:26:28 +0100 Subject: [PATCH 6/9] test: test with a cache --- .github/workflows/app-deploy-feature-branch.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/app-deploy-feature-branch.yml b/.github/workflows/app-deploy-feature-branch.yml index 5b862b4edd..f2523a13e3 100644 --- a/.github/workflows/app-deploy-feature-branch.yml +++ b/.github/workflows/app-deploy-feature-branch.yml @@ -26,8 +26,24 @@ jobs: node-version: '18' cache: 'npm' + - name: Cache node modules + id: cache-nodemodules + uses: actions/cache@v3 + env: + cache-name: cache-node-modules + # Workaround for bug https://github.com/typicode/husky/issues/991 + HUSKY: 0 + with: + path: node_modules + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: Install dependencies working-directory: ./ + if: steps.cache-nodemodules.outputs.cache-hit != 'true' run: | npm pkg delete scripts.prepare npm ci From 19e525140f84d8cdeba0d5bf8928d53183d57391 Mon Sep 17 00:00:00 2001 From: pcheremu Date: Thu, 9 Nov 2023 02:40:55 +0100 Subject: [PATCH 7/9] test: refactoring --- .github/workflows/app-e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/app-e2e.yml b/.github/workflows/app-e2e.yml index 51cde34503..ff75de8c83 100644 --- a/.github/workflows/app-e2e.yml +++ b/.github/workflows/app-e2e.yml @@ -57,7 +57,7 @@ jobs: name: '${{ matrix.tags }}' container: - image: mcr.microsoft.com/playwright:v1.39.0-jammy + image: mcr.microsoft.com/playwright:v1.27.0-focal options: --user root steps: - uses: actions/checkout@v3 From 8831d1b4aacb3527bc1b26171694f57295f5896f Mon Sep 17 00:00:00 2001 From: pcheremu Date: Thu, 9 Nov 2023 02:53:31 +0100 Subject: [PATCH 8/9] test: refactoring --- .github/workflows/app-deploy-feature-branch.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/app-deploy-feature-branch.yml b/.github/workflows/app-deploy-feature-branch.yml index f2523a13e3..5b862b4edd 100644 --- a/.github/workflows/app-deploy-feature-branch.yml +++ b/.github/workflows/app-deploy-feature-branch.yml @@ -26,24 +26,8 @@ jobs: node-version: '18' cache: 'npm' - - name: Cache node modules - id: cache-nodemodules - uses: actions/cache@v3 - env: - cache-name: cache-node-modules - # Workaround for bug https://github.com/typicode/husky/issues/991 - HUSKY: 0 - with: - path: node_modules - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - name: Install dependencies working-directory: ./ - if: steps.cache-nodemodules.outputs.cache-hit != 'true' run: | npm pkg delete scripts.prepare npm ci From 427d64a14a1a4c31448443ac6dc325a2e1602015 Mon Sep 17 00:00:00 2001 From: pcheremu Date: Thu, 9 Nov 2023 12:41:03 +0100 Subject: [PATCH 9/9] test: remove an issue workaround for husky --- .github/workflows/app-e2e.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/app-e2e.yml b/.github/workflows/app-e2e.yml index ff75de8c83..5ca7ad825d 100644 --- a/.github/workflows/app-e2e.yml +++ b/.github/workflows/app-e2e.yml @@ -75,8 +75,6 @@ jobs: uses: actions/cache@v3 env: cache-name: cache-node-modules - # Workaround for bug https://github.com/typicode/husky/issues/991 - HUSKY: 0 with: path: node_modules key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}