Skip to content

Commit 4892381

Browse files
Add GitHub Actions for CI/CD
- Introduced a new GitHub Action .github/actions/prepare/action.yml to set up the environment for CI jobs. This action installs pnpm and Node.js and installs project dependencies. -
1 parent 5c26c52 commit 4892381

File tree

4 files changed

+57
-0
lines changed

4 files changed

+57
-0
lines changed

.github/actions/prepare/action.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
description: Prepares the repo for a typical CI job
2+
3+
name: Prepare
4+
5+
runs:
6+
steps:
7+
- name: Install pnpm
8+
uses: pnpm/action-setup@v4
9+
with:
10+
version: 10
11+
- name: Use Node.js
12+
uses: actions/setup-node@v4
13+
with:
14+
node-version: '22'
15+
cache: 'pnpm'
16+
- name: Install dependencies
17+
run: pnpm install
18+
shell: bash
19+
using: composite

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: 'npm'
4+
# Files stored in `app` directory
5+
directory: '/'
6+
schedule:
7+
interval: 'daily'
8+
target-branch: 'main'

.github/workflows/lint.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Lint
2+
on:
3+
pull_request: ~
4+
push:
5+
branches:
6+
- main
7+
jobs:
8+
lint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: ./.github/actions/prepare
13+
- run: pnpm lint

.github/workflows/test.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Test
2+
on:
3+
pull_request: ~
4+
push:
5+
branches:
6+
- main
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: szenius/[email protected]
12+
with:
13+
timezoneLinux: 'Asia/Tokyo'
14+
- uses: actions/checkout@v4
15+
- uses: ./.github/actions/prepare
16+
- name: Test
17+
run: pnpm test

0 commit comments

Comments
 (0)