react-native-vision-camera/.github/workflows/validate-js.yml

93 lines
2.2 KiB
YAML
Raw Normal View History

2021-02-23 06:29:59 -07:00
name: Validate JS
2021-02-23 04:19:07 -07:00
on:
push:
branches:
2021-02-23 06:00:32 -07:00
- main
2021-02-23 04:19:07 -07:00
paths:
2021-02-23 06:29:59 -07:00
- '.github/workflows/validate-js.yml'
2021-02-23 04:41:31 -07:00
- 'src/**'
- '*.js'
- '*.json'
- 'package.json'
2021-02-23 04:19:07 -07:00
pull_request:
paths:
2021-02-23 06:29:59 -07:00
- '.github/workflows/validate-js.yml'
2021-02-23 04:41:31 -07:00
- 'src/**'
- '*.js'
- '*.json'
- 'package.json'
2021-02-23 04:19:07 -07:00
2021-02-23 03:58:30 -07:00
jobs:
2021-02-23 06:39:54 -07:00
setup:
name: Setup node_modules
2021-02-23 03:58:30 -07:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
2021-02-23 06:46:11 -07:00
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
2021-02-23 04:15:33 -07:00
- uses: actions/cache@v2
2021-02-23 06:46:11 -07:00
id: yarn-cache
2021-02-23 04:15:33 -07:00
with:
2021-02-23 06:46:11 -07:00
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
2021-02-23 04:15:33 -07:00
restore-keys: |
2021-02-23 06:46:11 -07:00
${{ runner.os }}-yarn-
2021-02-23 03:58:30 -07:00
- name: Install modules
run: yarn
2021-02-23 04:13:11 -07:00
- name: Install modules (example/)
run: yarn example
2021-02-23 06:39:54 -07:00
tsc:
name: Run TypeScript
2021-02-23 06:40:14 -07:00
needs: setup
2021-02-23 06:39:54 -07:00
runs-on: ubuntu-latest
steps:
2021-02-23 06:43:23 -07:00
- uses: actions/checkout@v2
2021-02-23 06:46:11 -07:00
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
2021-02-23 06:43:23 -07:00
- uses: actions/cache@v2
2021-02-23 06:46:11 -07:00
id: yarn-cache
2021-02-23 06:43:23 -07:00
with:
2021-02-23 06:46:11 -07:00
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
2021-02-23 06:43:23 -07:00
restore-keys: |
2021-02-23 06:46:11 -07:00
${{ runner.os }}-yarn-
2021-02-23 06:49:17 -07:00
- name: Install modules
run: yarn
- name: Install modules (example/)
run: yarn example
2021-02-23 06:27:16 -07:00
- name: Run TypeScript
run: yarn typescript
2021-02-23 06:39:54 -07:00
lint:
name: Run ESLint and Prettier
2021-02-23 06:40:14 -07:00
needs: setup
2021-02-23 06:39:54 -07:00
runs-on: ubuntu-latest
steps:
2021-02-23 06:43:23 -07:00
- uses: actions/checkout@v2
2021-02-23 06:46:11 -07:00
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
2021-02-23 06:43:23 -07:00
- uses: actions/cache@v2
2021-02-23 06:46:11 -07:00
id: yarn-cache
2021-02-23 06:43:23 -07:00
with:
2021-02-23 06:46:11 -07:00
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
2021-02-23 06:43:23 -07:00
restore-keys: |
2021-02-23 06:46:11 -07:00
${{ runner.os }}-yarn-
2021-02-23 06:49:17 -07:00
- name: Install modules
run: yarn
- name: Install modules (example/)
run: yarn example
2021-02-23 03:58:30 -07:00
- name: Run ESLint
2021-02-23 06:17:10 -07:00
run: yarn lint-ci