diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 72b6c56..1bb2689 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,13 +13,6 @@ jobs: timeout-minutes: 10 runs-on: ubuntu-latest - # env: - # SECRET_MONGODB_CONNECTION: ${{ secrets.SECRET_MONGODB_CONNECTION }} - # SECRET_JWT_KEY: ${{ secrets.SECRET_JWT_KEY }} - # SECRET_EMAIL_PASSWORD: ${{ secrets.SECRET_EMAIL_PASSWORD }} - # SECRET_COOKIE_SECURE_SETTING: ${{ secrets.SECRET_COOKIE_SECURE_SETTING }} - # SECRET_INTERNAL_API_KEY: ${{ secrets.SECRET_INTERNAL_API_KEY }} - # SECRET_VALID_AUTH_TOKEN: ${{ secrets.SECRET_VALID_AUTH_TOKEN }} env: SECRET_MONGODB_CONNECTION_STRING: ${{ secrets.SECRET_MONGODB_CONNECTION_STRING }} PUBLIC_YOUR_DOMAIN: ${{ secrets.PUBLIC_YOUR_DOMAIN }} @@ -33,18 +26,22 @@ jobs: with: node-version: lts/* + - name: Cache node modules + uses: actions/cache@v3 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - name: Install dependencies - run: | - npm i + run: npm ci - # - name: Test Jest API - # run: | - # npm run test:unit + - name: Install Playwright browsers + run: npx playwright install --with-deps chromium - name: Test Playwright API - run: | - npx playwright install --with-deps chromium - npx playwright test --project="Google Chrome" + run: npx playwright test --project="Google Chrome" - name: Upload Playwright Report uses: actions/upload-artifact@v4