-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (29 loc) · 891 Bytes
/
Copy pathformat.yml
File metadata and controls
37 lines (29 loc) · 891 Bytes
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
name: Format CI
on:
pull_request:
workflow_dispatch:
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
# Setup JDK for java formatting
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Fetch and install the project
run: |
git fetch --no-tags --prune --depth=5 origin ${{ github.event.pull_request.base.ref }}
npm ci
- name: Format-check Javascript-based files
run: npm run format:check:ts -- --base=origin/${{ github.event.pull_request.base.ref }}
- name: Format-check API files
run: npm run format:check:api