| name: 🚀 Build CI | |
| env: | |
| NODE_OPTIONS: --max-old-space-size=6144 | |
| on: | |
| push: | |
| branches: [master, dev] | |
| pull_request: | |
| branches: [master, dev] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node: [ '14', '16' ] | |
| name: build steps | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Use Node.js ${{ matrix.node }} | |
| uses: actions/setup-node@v2 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: Cache Node Dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: node_modules | |
| key: ${{runner.OS}}-${{ hashFiles('**/yarn.lock') }} | |
| - name: Install | |
| run: yarn install | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| - name: Build | |
| run: yarn build | |
| - name: Test | |
| run: yarn test | |