-
Notifications
You must be signed in to change notification settings - Fork 67
43 lines (41 loc) · 1.16 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: CI
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
cache: npm
- name: Check file existence
uses: andstor/file-existence-action@v2
with:
fail: true
files: |
index.html, .parcelrc, .eslintrc.js, .eslintignore, .gitignore,
jest.config.js, tsconfig.json, package.json, README.md,
src/App.tsx, src/main.tsx, src/main.test.tsx,
src/components/Greeting.test.tsx, src/components/Greeting.tsx,
.vscode/settings.json
- name: Install dependencies
run: npm ci
- name: Markdown Lint
uses: DavidAnson/markdownlint-cli2-action@v9
with:
globs: |
README.md
- name: Lint
run: npx eslint --ext .js,.jsx,.ts,.tsx .
- name: Compile to check syntax
run: npx tsc --noEmit
- name: Run tests
run: npx jest --verbose --coverage