From 3dbb15f53473e26a211339b06e256b4c43c7ba41 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Mon, 12 Sep 2022 18:21:56 +0530 Subject: [PATCH] fix/Fixed github action for unit tests --- .github/workflows/ci-cd.yml | 44 ++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index c61c59d4cc..0240254c70 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -636,29 +636,29 @@ jobs: path: scripts/cypress/screenshots retention-days: 2 unit-tests: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [16.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - + runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - name: install dependencies nocodb-sdk - working-directory: ./packages/nocodb-sdk - run: npm ci - - name: build nocodb-sdk - working-directory: ./packages/nocodb-sdk - run: npm run build:main - - name: install dependencies nocodb - working-directory: ./packages/nocodb - run: npm ci + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 16.15.0 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + 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 }}- - name: setup mysql working-directory: ./ run: docker-compose -f ./scripts/docker-compose-cypress.yml up -d