-
-
Notifications
You must be signed in to change notification settings - Fork 27
52 lines (52 loc) · 1.38 KB
/
format-lint-test.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
44
45
46
47
48
49
50
51
52
name: "Format, Lint, & Test"
on:
pull_request:
types:
- opened
- reopened
- synchronize
branches-ignore:
- ignore-*
jobs:
run_checks:
name: Run All Checks
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Install dependencies
run: npm install
- name: Check for linting errors on changed code
uses: reviewdog/action-eslint@v1
if: always()
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
reporter: github-pr-review
eslint_flags: src
filter_mode: diff_context
fail_on_error: true
- name: Check for formatting errors on changed code
uses: EPMatt/reviewdog-action-prettier@v1
if: always()
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
reporter: github-pr-review
filter_mode: diff_context
fail_on_error: true
- name: Ensure unit tests pass
id: test
if: always()
run: npm test
- name: Ensure docs build without errors
id: jsdoc-dry-run
if: always()
run: npm run jsdoc-dry-run