Bump js-yaml from 3.14.1 to 3.14.2 #228
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: JavaScript Unit Tests | |
| on: | |
| push: | |
| # Only run if JS-related files changed. | |
| paths: | |
| - '**.js' | |
| - '**/package.json' | |
| - 'package-lock.json' | |
| - 'packages/templates/src/raw/**' | |
| - 'packages/text-sets/src/raw/**' | |
| - 'patches/**' | |
| branches: | |
| - main | |
| - release/* | |
| pull_request: | |
| # Only run if JS-related files changed. | |
| paths: | |
| - '**.js' | |
| - '**/package.json' | |
| - 'package-lock.json' | |
| - 'packages/templates/src/raw/**' | |
| - 'packages/text-sets/src/raw/**' | |
| - 'patches/**' | |
| jobs: | |
| unit-js: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Cancel previous | |
| uses: styfle/[email protected] | |
| with: | |
| access_token: ${{ github.token }} | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Read .nvmrc | |
| run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)" | |
| id: nvm | |
| - name: Setup Node | |
| uses: actions/[email protected] | |
| with: | |
| node-version: ${{ steps.nvm.outputs.NVMRC }} | |
| - name: Cache node modules | |
| uses: pat-s/[email protected] | |
| with: | |
| # npm cache files are stored in `~/.npm` on Linux/macOS | |
| path: ~/.npm | |
| key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-build-${{ env.cache-name }}- | |
| ${{ runner.os }}-build- | |
| ${{ runner.os }}- | |
| env: | |
| cache-name: cache-node-modules | |
| - name: Setup Jest cache | |
| uses: actions/[email protected] | |
| id: cache-jest-cache | |
| with: | |
| path: .jest-cache | |
| key: ${{ runner.os }}-${{ steps.nvm.outputs.NVMRC }}-jest | |
| # Rollup is needed for tests in `packages/migration/src` expecting `module.js` | |
| - name: Install dependencies | |
| run: | | |
| npm ci | |
| npx rollup --config packages/migration/src/rollup.config.migrate.js | |
| env: | |
| CI: true | |
| - name: Run JavaScript unit tests | |
| run: npm run test:js -- --runInBand --ci --cacheDirectory="$HOME/.jest-cache" --collectCoverage | |
| - name: Upload code coverage report | |
| uses: codecov/codecov-action@v1 | |
| with: | |
| file: build/logs/lcov.info | |
| flags: unittests |