| name: Node CI |
| |
| on: |
| pull_request: |
| types: [opened, synchronize] |
| |
| jobs: |
| build: |
| |
| runs-on: ubuntu-latest |
| |
| strategy: |
| matrix: |
| node-version: [12.x] |
| |
| steps: |
| - uses: actions/checkout@v1 |
| - name: Use Node.js ${{ matrix.node-version }} |
| uses: actions/setup-node@v1 |
| with: |
| node-version: ${{ matrix.node-version }} |
| |
| - name: Cache node modules |
| uses: actions/cache@v2 |
| env: |
| cache-name: cache-node-modules |
| with: |
| # npm cache files are stored in `~/.npm` on Linux/macOS |
| path: ~/.npm |
| key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} |
| |
| - name: npm install |
| run: npm ci |
| |
| # - name: check type |
| # run: npm run checktype |
| |
| - name: build release |
| run: npm run release |
| |
| - name: Test generated DTS |
| run: npm run test:dts |
| |
| - name: Unit Test |
| run: npm run test |