| # This action run unit test for pull requests | |
| name: test | |
| on: [pull_request] | |
| jobs: | |
| unit: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [14.x, 16.x] | |
| env: | |
| DB_URL: mysql://root:root@localhost:3306/lake_db | |
| REDIS_URL: redis://localhost:6379/1 | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v2 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - run: 'npm install' | |
| - run: 'npm run test' |