-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (45 loc) · 1.27 KB
/
continuous-integration.yaml
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
name: Continuous Integration
permissions:
contents: write
on:
pull_request:
branches:
- main
- ci-testing
jobs:
lint-and-build:
name: Lint and Test Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
# This is important to fetch the changes to the previous commit
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v3
- name: Install Dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Build
run: npm run build
prettify:
name: Prettify Code
needs: lint-and-build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
# This is important to fetch the changes to the previous commit
fetch-depth: 0
- name: Prettify code
uses: creyD/[email protected]
with:
prettier_options: --write **/*.{js,ts,vue,md}
only_changed: True