Skip to content

Commit 79af7b8

Browse files
committed
.
1 parent 22df4e4 commit 79af7b8

12 files changed

+3343
-22
lines changed

.github/workflows/run-action.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Run the autograder action
2+
permissions:
3+
id-token: write # This is required for requesting the JWT
4+
contents: read # This is required for actions/checkout
5+
6+
on: ['push']
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v2
13+
with:
14+
node-version: '14'
15+
- run: npm install
16+
- run: npm run build
17+
- name: Run the autograder action
18+
uses: ./
19+
with:
20+
grading_server: 'https://khoury-classroom-dev.ngrok.pizza'

action.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ branding:
99

1010
# Define your inputs here.
1111
inputs:
12-
milliseconds:
13-
description: Your input description here
12+
grading_server:
13+
description: URL of the grading API server, e.g. https://autograder.ripley.cloud
1414
required: true
15-
default: '1000'
1615

1716
# Define your outputs here.
1817
outputs:

eslint.config.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ const compat = new FlatCompat({
2222

2323
export default [
2424
{
25-
ignores: ['**/coverage', '**/dist', '**/linter', '**/node_modules']
25+
ignores: [
26+
'**/coverage',
27+
'**/dist',
28+
'**/linter',
29+
'**/node_modules',
30+
'src/api'
31+
]
2632
},
2733
...compat.extends(
2834
'eslint:recommended',

openapi-codegen.config.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { generateSchemaTypes, generateFetchers } from '@openapi-codegen/typescript';
2+
import { defineConfig } from '@openapi-codegen/cli';
3+
export default defineConfig({
4+
adminService: {
5+
from: {
6+
relativePath: './swagger.json',
7+
source: 'file',
8+
},
9+
outputDir: 'src/api',
10+
to: async context => {
11+
const filenamePrefix = 'adminService';
12+
const { schemasFiles } = await generateSchemaTypes(context, {
13+
filenamePrefix,
14+
});
15+
await generateFetchers(context, {
16+
filenamePrefix,
17+
schemasFiles,
18+
});
19+
},
20+
},
21+
});

0 commit comments

Comments
 (0)