node.js.yml (741B)
1 # This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node 2 # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 4 name: Node.js CI 5 6 on: 7 push: 8 branches: [ master, dev ] 9 pull_request: 10 branches: [ master, dev ] 11 12 jobs: 13 build: 14 runs-on: ubuntu-latest 15 16 steps: 17 - uses: actions/checkout@v3 18 19 - name: Set up Node.js 20 uses: actions/setup-node@v3 21 with: 22 node-version: '20.x' 23 cache: 'npm' 24 25 - run: npm ci 26 - run: npx playwright install 27 - run: npm run build --if-present 28 - run: npm run test:unit 29 - run: npm run test:e2e