Don't merge open PRs in dev by default. #331
Workflow file for this run
This file contains 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: Packages Lint & Test | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- 'packages/**' | |
concurrency: | |
group: ${{ github.workflow }}-${{ 'pull_request' == github.event_name && github.head_ref || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Cache node_modules | |
uses: actions/cache@v2 | |
id: npm-cache | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
- name: Install NPM Dependencies | |
if: steps.npm-cache.outputs.cache-hit != 'true' | |
run: npm ci | |
- name: Run linter | |
continue-on-error: true | |
run: npm run pkg:lint:js | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16' | |
- name: Cache node_modules | |
uses: actions/cache@v2 | |
id: npm-cache | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
- name: Install NPM Dependencies | |
if: steps.npm-cache.outputs.cache-hit != 'true' | |
run: npm ci | |
- name: Run test suite | |
uses: artiomtr/jest-coverage-report-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
skip-step: install | |
threshold: 50 | |
test-script: npm run pkg:test -- --coverageReporters="text" --coverageReporters="text-summary" |