2021-02-23 14:29:59 +01:00
|
|
|
name: Validate JS
|
2021-02-23 12:19:07 +01:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2021-02-23 14:00:32 +01:00
|
|
|
- main
|
2021-02-23 12:19:07 +01:00
|
|
|
paths:
|
2021-02-23 14:29:59 +01:00
|
|
|
- '.github/workflows/validate-js.yml'
|
2021-02-23 12:41:31 +01:00
|
|
|
- 'src/**'
|
|
|
|
- '*.js'
|
|
|
|
- '*.json'
|
|
|
|
- 'package.json'
|
2021-02-26 17:34:28 +01:00
|
|
|
- 'tsconfig.json'
|
|
|
|
- '.prettierrc.js'
|
|
|
|
- '.eslintrc.js'
|
|
|
|
- 'babel.config.js'
|
2021-02-23 12:19:07 +01:00
|
|
|
pull_request:
|
|
|
|
paths:
|
2021-02-23 14:29:59 +01:00
|
|
|
- '.github/workflows/validate-js.yml'
|
2021-02-23 12:41:31 +01:00
|
|
|
- 'src/**'
|
|
|
|
- '*.js'
|
|
|
|
- '*.json'
|
|
|
|
- 'package.json'
|
2021-02-26 17:34:28 +01:00
|
|
|
- 'tsconfig.json'
|
|
|
|
- '.prettierrc.js'
|
|
|
|
- '.eslintrc.js'
|
|
|
|
- 'babel.config.js'
|
2021-02-23 12:19:07 +01:00
|
|
|
|
2021-02-23 11:58:30 +01:00
|
|
|
jobs:
|
2021-02-23 14:52:41 +01:00
|
|
|
vibe_check:
|
|
|
|
name: Validate JS (tsc, eslint, prettier)
|
2021-02-23 14:39:54 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-02-23 14:43:23 +01:00
|
|
|
- uses: actions/checkout@v2
|
2021-02-23 14:46:11 +01:00
|
|
|
|
|
|
|
- name: Get yarn cache directory path
|
|
|
|
id: yarn-cache-dir-path
|
|
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
2021-02-23 14:43:23 +01:00
|
|
|
- uses: actions/cache@v2
|
2021-02-23 14:46:11 +01:00
|
|
|
id: yarn-cache
|
2021-02-23 14:43:23 +01:00
|
|
|
with:
|
2021-02-23 14:46:11 +01:00
|
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
2021-02-23 14:43:23 +01:00
|
|
|
restore-keys: |
|
2021-02-23 14:46:11 +01:00
|
|
|
${{ runner.os }}-yarn-
|
|
|
|
|
2021-02-23 14:49:17 +01:00
|
|
|
- name: Install modules
|
|
|
|
run: yarn
|
|
|
|
- name: Install modules (example/)
|
|
|
|
run: yarn example
|
|
|
|
|
2021-02-23 14:27:16 +01:00
|
|
|
- name: Run TypeScript
|
|
|
|
run: yarn typescript
|
2021-02-23 14:49:17 +01:00
|
|
|
|
2021-02-23 11:58:30 +01:00
|
|
|
- name: Run ESLint
|
2021-02-23 14:17:10 +01:00
|
|
|
run: yarn lint-ci
|