Skip to content

feat: openapi-generatorを導入 #49

feat: openapi-generatorを導入

feat: openapi-generatorを導入 #49

Workflow file for this run

name: CI
on:
push:
branches:
- 'main'
pull_request:
jobs:
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
- name: Check for differences in generated APIs
run: |
git diff --exit-code ./src/lib/apis/generated || {
echo "Generated APIs are outdated or modified. Please run 'npm run gen-api' and commit the changes."
exit 1
}
build:
name: Build
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 build
env:
NODE_ENV: production
lint:
name: Lint
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 lint:nofix
format:
name: Format
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 format:nofix
typeCheck:
name: Type Check
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 type-check