test.yml
1 name: Test 2 3 on: 4 push: 5 branches: [ "main" ] 6 pull_request: 7 branches: [ "main" ] 8 # Allows you to run this workflow manually from the Actions tab 9 workflow_dispatch: 10 11 jobs: 12 test: 13 runs-on: ubuntu-latest 14 15 steps: 16 - name: Checkout repository 17 uses: actions/checkout@v4 18 19 - name: Setup Node.js 20 uses: actions/setup-node@v4 21 with: 22 node-version: "22" 23 24 - name: Clean install dependencies 25 run: | 26 rm -rf node_modules package-lock.json 27 npm install 28 29 - name: Run tests 30 run: npm run test