Skip to content

Commit 0b51aca

Browse files
committed
Add github CI workflow
1 parent a43904d commit 0b51aca

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
types: [opened, reopened, synchronize, ready_for_review]
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Node.js
23+
uses: actions/setup-node@v4.4.0
24+
with:
25+
node-version-file: ".nvmrc"
26+
27+
- name: Redis Server in GitHub Actions
28+
uses: supercharge/redis-github-action@1.8.0
29+
30+
- name: Use yarn cache
31+
uses: actions/cache@v4.2.3
32+
with:
33+
path: "**/node_modules"
34+
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
35+
restore-keys: |
36+
${{ runner.os }}-node-
37+
38+
- name: Enable corepack
39+
run: corepack enable
40+
41+
- name: Install dependencies
42+
run: yarn
43+
44+
- name: Run tests
45+
run: yarn test-all

0 commit comments

Comments
 (0)