Update run-tests.yml #20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Tests | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [**] | ||
jobs: | ||
run-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 📥 Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: 🧰 Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
- name: 📦 Cache Node.js modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: 📦 Install dependencies & Playwright | ||
run: npm ci && npx playwright install | ||
- name: 🧪 Run CodeceptJS Definitions & Tests | ||
run: | | ||
npx codeceptjs def | ||
npm test |