Init Project - CI/CD - Doc #1
This file contains 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 | |
paths: | |
- 'package.json' | |
- 'package-lock.json' | |
- 'src/**' | |
- 'test/**' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'package.json' | |
- 'package-lock.json' | |
- 'src/**' | |
- 'test/**' | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
registry-url: https://registry.npmjs.org/ | |
- run: npm ci | |
- name: Lint with ESLint | |
run: npm run lint | |
- name: Prepare testing with the playground | |
run: npm run dev:prepare | |
- name: Test package | |
run: npm run test |