Skip to content

Commit 4b59fb0

Browse files
committed
feat(submodule): add submodules for go-api and risk-api
1 parent 03e2c99 commit 4b59fb0

File tree

5 files changed

+32
-20
lines changed

5 files changed

+32
-20
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -230,24 +230,26 @@ jobs:
230230
- name: Lint CSS
231231
run: pnpm lint:css
232232

233-
# FIXME: Identify a way to generate schema before we run typecheck
234-
# typecheck:
235-
# name: Typecheck
236-
# runs-on: ubuntu-latest
237-
# steps:
238-
# - uses: actions/checkout@v4
239-
# - name: Install pnpm
240-
# uses: pnpm/action-setup@v4
241-
# - name: Install Node.js
242-
# uses: actions/setup-node@v4
243-
# with:
244-
# node-version: 20
245-
# cache: 'pnpm'
246-
# - name: Install dependencies
247-
# run: pnpm install
248-
#
249-
# - name: Typecheck
250-
# run: pnpm typecheck
233+
typecheck:
234+
name: Typecheck
235+
runs-on: ubuntu-latest
236+
defaults:
237+
run:
238+
working-directory: app
239+
steps:
240+
- uses: actions/checkout@v4
241+
- name: Install pnpm
242+
uses: pnpm/action-setup@v4
243+
- name: Install Node.js
244+
uses: actions/setup-node@v4
245+
with:
246+
node-version: 20
247+
cache: 'pnpm'
248+
- name: Install dependencies
249+
run: pnpm install
250+
251+
- name: Typecheck
252+
run: pnpm typecheck
251253

252254
typos:
253255
name: Spell Check with Typos

.gitmodules

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[submodule "go-api"]
2+
path = go-api
3+
url = https://github.com/IFRCGo/go-api.git
4+
branch = feature/schema-file
5+
[submodule "risk-api"]
6+
path = risk-api
7+
url = https://github.com/IFRCGo/go-risk-module-api.git
8+
branch = feature/schema-file

app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"initialize:type:go-api": "test -f ./generated/types.ts && true || cp types.stub.ts ./generated/types.ts",
1818
"initialize:type:risk-api": "test -f ./generated/riskTypes.ts && true || cp types.stub.ts ./generated/riskTypes.ts",
1919
"generate:type": "pnpm generate:type:go-api && pnpm generate:type:risk-api",
20-
"generate:type:go-api": "dotenv -- cross-var openapi-typescript \"%APP_API_ENDPOINT%api-docs/\" -o ./generated/types.ts --alphabetize",
21-
"generate:type:risk-api": "dotenv -- cross-var openapi-typescript \"%APP_RISK_API_ENDPOINT%api-docs/\" -o ./generated/riskTypes.ts --alphabetize",
20+
"generate:type:go-api": "dotenv -- cross-var openapi-typescript ../go-api/openapi-schema.yaml -o ./generated/types.ts --alphabetize",
21+
"generate:type:risk-api": "dotenv -- cross-var openapi-typescript ../risk-api/openapi-schema.yaml -o ./generated/riskTypes.ts --alphabetize",
2222
"prestart": "pnpm initialize:type",
2323
"start": "pnpm -F @ifrc-go/ui build && vite",
2424
"prebuild": "pnpm initialize:type",

go-api

Submodule go-api added at bde0550

risk-api

Submodule risk-api added at f2499a7

0 commit comments

Comments
 (0)