Skip to content

Commit 51b109c

Browse files
authored
Merge pull request #1 from duckduckgo/nastia/ci
Add CI
2 parents a8355ca + 8791fe6 commit 51b109c

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/tests.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Tests and formatting
2+
3+
on:
4+
push:
5+
merge_group:
6+
7+
jobs:
8+
unit:
9+
runs-on: ubuntu-20.04
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Use Node.js 20
13+
uses: actions/setup-node@v4
14+
with:
15+
node-version: 20.x
16+
- name: Install dependencies
17+
run: npm ci
18+
- name: Run tests
19+
run: npm run test
20+
lint:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Use Node.js 20
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 20.x
28+
- name: Install dependencies
29+
run: npm ci
30+
- name: Format check
31+
run: npm run lint && echo 'No lint issues!' || (npm run lint-fix; git diff; echo 'Lint check failed, review diff above or run "npm run lint.fix"'; return 1)

0 commit comments

Comments
 (0)