Skip to content

Commit

Permalink
chore(ci): streamline GitHub Actions workflow and improve caching for…
Browse files Browse the repository at this point in the history
… node modules
  • Loading branch information
MoinJulian committed Nov 21, 2024
1 parent 51c85ba commit b5a9275
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand Down

0 comments on commit b5a9275

Please sign in to comment.