41 lines
864 B
YAML
41 lines
864 B
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:
|
|
validate:
|
|
name: Validate JS (tsc, eslint, prettier)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: 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
|
|
- name: Run ESLint
|
|
run: yarn lint-ci
|