Skip to content

Commit f32fab7

Browse files
authored
update GitHub Actions (#946)
* update GitHub Actions scripts * add issue templates * fix lint warning
1 parent 4a28262 commit f32fab7

File tree

6 files changed

+57
-53
lines changed

6 files changed

+57
-53
lines changed

.github/ISSUE_TEMPLATE/bug.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# 🦟 Bug Report
2+
3+
## Error description
4+
5+
<!-- Descripbe the error seen, or the unexpected message. -->
6+
<!-- Please include your OpenAPI schema (slong with versoin!) -->
7+
8+
## Expected output
9+
10+
<!-- Describe what you expected to see -->

.github/ISSUE_TEMPLATE/feature.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# ✨ Feature request
2+
3+
## OpenAPI Schema
4+
5+
<!-- Paste your OpenAPI schema here (at least the relevant parts) -->
6+
7+
## Proposal
8+
9+
<!-- Given the schema, what TypeScript types/code should gt generate? -->
10+
<!-- If this is accessible via the CLI, what flags should be added? -->

.github/workflows/ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: ci
2+
3+
on:
4+
- pull_request
5+
6+
jobs:
7+
lint:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- uses: pnpm/action-setup@v2
12+
with:
13+
version: 7
14+
- uses: actions/setup-node@v3
15+
- run: pnpm i
16+
- run: npm run lint
17+
test:
18+
strategy:
19+
matrix:
20+
node-version: [16.x, 18.x]
21+
os: [macos-12, ubuntu-latest, windows-latest]
22+
runs-on: ${{ matrix.os }}
23+
steps:
24+
- uses: actions/checkout@v3
25+
- uses: pnpm/action-setup@v2
26+
with:
27+
version: 7
28+
- uses: actions/setup-node@v3
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
- run: pnpm i
32+
- run: npm test
33+
if: matrix.os != 'macos-12' || matrix.node-version != '18.x'
34+
- run: npm run test:coverage
35+
if: matrix.os == 'macos-12' && matrix.node-version == '18.x'
36+
- uses: codecov/codecov-action@v3
37+
if: matrix.os == 'macos-16' && matrix.node-version == '18.x'

.github/workflows/pull_request.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

src/transform/schema.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
nodeType,
55
tsArrayOf,
66
tsIntersectionOf,
7-
tsPartial,
87
tsReadonly,
98
tsTupleOf,
109
tsUnionOf,

src/utils.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,6 @@ export function tsIntersectionOf(types: string[]): string {
260260
return `(${typesWithValues.join(") & (")})`;
261261
}
262262

263-
/** Convert T into Partial<T> */
264-
export function tsPartial(type: string): string {
265-
return `Partial<${type}>`;
266-
}
267-
268263
export function tsReadonly(immutable: boolean): string {
269264
return immutable ? "readonly " : "";
270265
}

0 commit comments

Comments
 (0)