-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.22 KB
/
lint.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
# Workflow name:
name: lint
# Workflow triggers:
on:
# Allow the workflow to be manually run:
workflow_dispatch:
# Run workflow on each push to the main branch:
push:
# Define branches to run workflow on:
branches:
- main
# Run workflow on each pull request:
pull_request:
# Workflow jobs:
jobs:
# Define job to lint code...
lint:
# Define display name:
name: 'Lint code'
# Define the type of virtual host machine:
runs-on: 'ubuntu-latest'
# Define the sequence of job steps...
steps:
# Checkout the repository:
- name: 'Checkout repository'
uses: actions/checkout@v3
# Install Node.js:
- name: 'Install Node.js'
uses: actions/setup-node@v3
with:
node-version: 16
timeout-minutes: 5
# Install dependencies:
- name: 'Install production and development dependencies'
id: install
run: |
npm install || npm install || npm install
timeout-minutes: 15
# Run linting:
- name: 'Run linting'
run: |
npm run lint || npm run lint || npm run lint
timeout-minutes: 15