Skip to content

created ts and rs files by api document #27

created ts and rs files by api document

created ts and rs files by api document #27

Workflow file for this run

name: client
on:
pull_request:
branches:
- main
paths:
- "/client/**"
- .github/workflows/client.yaml
jobs:
setup-packages:
name: Check npm packages
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
sparse-checkout: client
- name: setup node
uses: actions/setup-node@v4
with:
node-version-file: ./client/.node-version
cache: npm
cache-dependency-path: ./client/package-lock.json
- name: npm ci
run: npm ci
working-directory: ./client/
gen-api:
name: generate and upload api files
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
sparse-checkout: |
client
docs/openapi.yaml
- name: npm ci
run: npm ci
working-directory: ./client/
- name: generate api
run: npm run api-client
working-directory: ./client/
- name: upload api files
uses: actions/upload-artifact@v4
with:
name: apis
path: ./client/src/lib/apis/generated
build-check:
name: Check npm build
needs: [setup-packages, gen-api]
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
sparse-checkout: client
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ./client/.node-version
cache: npm
cache-dependency-path: ./client/package-lock.json
- name: npm ci
run: npm ci
working-directory: ./client/
- name: download api files
uses: actions/download-artifact@v4
with:
name: apis
path: ./client/src/lib/apis/generated
- name: Run build
run: npm run build
working-directory: ./client/