react-native-vision-camera/.github/workflows/validate-js.yml
2021-02-23 14:43:23 +01:00

79 lines
1.8 KiB
YAML

name: Validate JS
on:
push:
branches:
- main
paths:
- '.github/workflows/validate-js.yml'
- 'src/**'
- '*.js'
- '*.json'
- 'package.json'
pull_request:
paths:
- '.github/workflows/validate-js.yml'
- 'src/**'
- '*.js'
- '*.json'
- 'package.json'
jobs:
setup:
name: Setup node_modules
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
node_modules
example/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install modules
run: yarn
- name: Install modules (example/)
run: yarn example
tsc:
name: Run TypeScript
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
node_modules
example/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
# - name: Install modules
# run: yarn
# - name: Install modules (example/)
# run: yarn example
- name: Run TypeScript
run: yarn typescript
lint:
name: Run ESLint and Prettier
needs: setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
node_modules
example/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
# - name: Install modules
# run: yarn
# - name: Install modules (example/)
# run: yarn example
- name: Run ESLint
run: yarn lint-ci