Skip to content

Commit 702bbde

Browse files
committed
Add CI workflow and build status badge
Introduces a GitHub Actions CI workflow to automate build and test steps for Node.js versions 18.x and 20.x. Updates README to display the build status badge for improved project visibility.
1 parent 288ad4f commit 702bbde

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.x, 20.x]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
cache: 'npm'
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Build
30+
run: npm run build
31+
32+
- name: Check build output
33+
run: |
34+
if [ ! -f dist/index.js ]; then
35+
echo "Build failed - dist/index.js not found"
36+
exit 1
37+
fi
38+
echo "Build successful!"

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Mutasiku Discord Bot Example
22

3+
![Build Status](https://github.com/Mutasiku-ID/node-mutasiku-discord-example/actions/workflows/ci.yml/badge.svg)
4+
35
Example Discord bot using [mutasiku-sdk](https://github.com/Mutasiku-ID/node-mutasiku-sdk) for payments.
46

57
## Features

0 commit comments

Comments
 (0)