Skip to content

feat: openapi-generatorを導入 #47

feat: openapi-generatorを導入

feat: openapi-generatorを導入 #47

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: mkdir -p ./temp/generated
- run: npm run gen-api -- --output ./temp/generated
- name: Check for differences in generated APIs
run: |
diff -qr ./src/lib/apis/generated ./temp/generated || {
echo "Generated APIs are outdated or modified. 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