Skip to content

Commit

Permalink
feat: GitHub Actions のワークフローに genApi を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
reiroop committed Jan 11, 2025
1 parent b190b5c commit 0c15a2b
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,52 +7,107 @@ on:
pull_request:

jobs:
packages:
name: Packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- run: npm ci

genApi:
name: Generate APIs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- run: npm ci
- run: npm run gen-api
- uses: actions/upload-artifact@v4
with:
name: apis
path: ./src/lib/apis/generated

build:
name: Build
runs-on: ubuntu-latest
needs:
- packages
- genApi
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- run: npm ci
- uses: actions/download-artifact@v4
with:
name: apis
path: ./src/lib/apis/generated
- run: npm run build
env:
NODE_ENV: production

lint:
name: Lint
runs-on: ubuntu-latest
needs:
- packages
- genApi
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- run: npm ci
- uses: actions/download-artifact@v4
with:
name: apis
path: ./src/lib/apis/generated
- run: npm run lint:nofix

format:
name: Format
runs-on: ubuntu-latest
needs:
- packages
- genApi
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- run: npm ci
- uses: actions/download-artifact@v4
with:
name: apis
path: ./src/lib/apis/generated
- run: npm run format:nofix

typeCheck:
name: Type Check
runs-on: ubuntu-latest
needs:
- packages
- genApi
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm
- run: npm ci
- uses: actions/download-artifact@v4
with:
name: apis
path: ./src/lib/apis/generated
- run: npm run type-check

0 comments on commit 0c15a2b

Please sign in to comment.