Skip to content

Commit cde5845

Browse files
committed
Introduce CI, fix formatting
1 parent 6e8cd31 commit cde5845

File tree

4 files changed

+89
-2
lines changed

4 files changed

+89
-2
lines changed

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Bug report
22
description: If you encounter disruptive behaviour, open a bug report.
3-
title: 'Bug report'
3+
title: "Bug report"
44
body:
55
- type: textarea
66
id: current-behaviour

.github/ISSUE_TEMPLATE/feature-request.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Feature request
22
description: To define a new feature or an enhancement, open a feature request.
3-
title: 'Feature request'
3+
title: "Feature request"
44
body:
55
- type: textarea
66
id: user-story

.github/workflows/ci.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: CI
2+
3+
on: push
4+
5+
jobs:
6+
audit:
7+
runs-on: ubuntu-latest
8+
name: Audit
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v4
12+
- name: Set up Node.js
13+
uses: actions/setup-node@v4
14+
with:
15+
node-version-file: .nvmrc
16+
cache: npm
17+
- name: Audit dependencies
18+
run: npm audit
19+
20+
format:
21+
runs-on: ubuntu-latest
22+
name: Format check
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
- name: Set up Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version-file: .nvmrc
30+
cache: npm
31+
- name: Install dependencies
32+
run: npm ci
33+
- name: Check formatting
34+
run: npm run format
35+
36+
lint:
37+
runs-on: ubuntu-latest
38+
name: Linter
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v4
42+
- name: Set up Node.js
43+
uses: actions/setup-node@v4
44+
with:
45+
node-version-file: .nvmrc
46+
cache: npm
47+
- name: Install dependencies
48+
run: npm ci
49+
- name: Lint affected projects
50+
run: npm run lint
51+
52+
test:
53+
strategy:
54+
fail-fast: false
55+
matrix:
56+
os: [ubuntu-latest, windows-latest]
57+
name: Unit tests
58+
runs-on: ${{ matrix.os }}
59+
steps:
60+
- name: Checkout repository
61+
uses: actions/checkout@v4
62+
- name: Set up Node.js
63+
uses: actions/setup-node@v4
64+
with:
65+
node-version-file: .nvmrc
66+
cache: npm
67+
- name: Install dependencies
68+
run: npm ci
69+
- name: run unit tests
70+
run: npm run test
71+
72+
build:
73+
runs-on: ubuntu-latest
74+
name: Build
75+
steps:
76+
- name: Checkout repository
77+
uses: actions/checkout@v4
78+
- name: Set up Node.js
79+
uses: actions/setup-node@v4
80+
with:
81+
node-version-file: .nvmrc
82+
cache: npm
83+
- name: Install dependencies
84+
run: npm ci
85+
- name: Build project
86+
run: npm run build

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20.11.0

0 commit comments

Comments
 (0)