Skip to content

Commit f94caa6

Browse files
authored
Merge pull request #15 from chingu-voyages/ci/add-github-actions
CI: Add GitHub Actions workflow
2 parents 78b245b + 619ac65 commit f94caa6

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: CI
2+
3+
# When should this run?
4+
on:
5+
push:
6+
branches: [ dev ] # Runs on pushes to dev
7+
pull_request:
8+
branches: [ main, dev ] # Runs on PRs to main or dev
9+
10+
# What jobs should run?
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest # Use Ubuntu as environment
14+
15+
steps:
16+
# Step 1: Get the code
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
# Step 2: Setup Node.js
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: '18'
25+
cache: 'yarn'
26+
27+
# Step 3: Install dependencies
28+
- name: Install dependencies
29+
run: yarn install --frozen-lockfile
30+
31+
# Step 4: Run lint
32+
- name: Lint
33+
run: yarn lint
34+
35+
# Step 5: Try to build
36+
- name: Build
37+
run: yarn build

0 commit comments

Comments
 (0)