Add new test cases #41
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: CI-Test | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| if: ${{ !contains(toJSON(github.event.pull_request.labels.*.name), 'ci-skip') }} | |
| timeout-minutes: 10 | |
| services: | |
| redis: | |
| image: redis:6 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v2 | |
| with: | |
| node-version: '20' | |
| - name: Prepare dot npmrc for private registry | |
| run: echo //npm.pkg.github.com/:_authToken=${{ secrets.GH_TOKEN }} >> ~/.npmrc | |
| - name: Bootstrap | |
| if: steps.node-cache.outputs.cache-hit != 'true' | |
| run: npm ci | |
| env: | |
| NPM_AUTH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| - name: Lint | |
| run: npm run lint | |
| env: | |
| NODE_ENV: dev | |
| CI: true | |
| - name: Test | |
| run: npm run test | |
| env: | |
| NODE_ENV: test | |
| CI: true | |
| REDIS_HOST: localhost | |
| REDIS_PORT: 6379 |