Search through untracked files for graphql-tag. Don't error out on files that can't be found. #236
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: Lint & Test | |
on: | |
pull_request: | |
# edited is needed because that's the trigger when the base branch is | |
# changed on a PR | |
# The rest are the defaults. | |
types: [edited, opened, synchronize, reopened] | |
jobs: | |
lint_and_test: | |
name: Lint & Test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node-version: [16.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: Khan/actions@shared-node-cache-v0 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Get All Changed Files | |
uses: Khan/actions@get-changed-files-v1 | |
id: changed | |
- id: js-files | |
name: Find .js changed files | |
uses: Khan/actions@filter-files-v0 | |
with: | |
changed-files: ${{ steps.changed.outputs.files }} | |
extensions: '.js' | |
- name: Run Flow | |
if: steps.js-files.outputs.filtered != '[]' | |
run: yarn flow | |
- id: eslint-reset | |
uses: Khan/actions@filter-files-v0 | |
name: Files that would trigger a full eslint run | |
with: | |
changed-files: ${{ steps.changed.outputs.files }} | |
files: '.eslintrc.js,package.json,.eslintignore' | |
- name: Eslint | |
uses: Khan/actions@full-or-limited-v0 | |
with: | |
full-trigger: ${{ steps.eslint-reset.outputs.filtered }} | |
full: yarn eslint | |
limited-trigger: ${{ steps.js-files.outputs.filtered }} | |
limited: yarn eslint {} | |
- id: jest-reset | |
uses: Khan/actions@filter-files-v0 | |
name: Files that would trigger a full jest run | |
with: | |
changed-files: ${{ steps.changed.outputs.files }} | |
files: 'package.json,package-lock.json' | |
- name: Jest | |
uses: Khan/actions@full-or-limited-v0 | |
with: | |
full-trigger: ${{ steps.jest-reset.outputs.filtered }} | |
full: yarn jest | |
limited-trigger: ${{ steps.js-files.outputs.filtered }} | |
limited: yarn jest --findRelatedTests {} |