Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-bell committed Jan 29, 2025
1 parent 22df4e4 commit 79af7b8
Show file tree
Hide file tree
Showing 12 changed files with 3,343 additions and 22 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/run-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Run the autograder action
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout

on: ['push']
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v2
with:
node-version: '14'
- run: npm install
- run: npm run build
- name: Run the autograder action
uses: ./
with:
grading_server: 'https://khoury-classroom-dev.ngrok.pizza'
5 changes: 2 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ branding:

# Define your inputs here.
inputs:
milliseconds:
description: Your input description here
grading_server:
description: URL of the grading API server, e.g. https://autograder.ripley.cloud
required: true
default: '1000'

# Define your outputs here.
outputs:
Expand Down
8 changes: 7 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ const compat = new FlatCompat({

export default [
{
ignores: ['**/coverage', '**/dist', '**/linter', '**/node_modules']
ignores: [
'**/coverage',
'**/dist',
'**/linter',
'**/node_modules',
'src/api'
]
},
...compat.extends(
'eslint:recommended',
Expand Down
21 changes: 21 additions & 0 deletions openapi-codegen.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { generateSchemaTypes, generateFetchers } from '@openapi-codegen/typescript';
import { defineConfig } from '@openapi-codegen/cli';
export default defineConfig({
adminService: {
from: {
relativePath: './swagger.json',
source: 'file',
},
outputDir: 'src/api',
to: async context => {
const filenamePrefix = 'adminService';
const { schemasFiles } = await generateSchemaTypes(context, {
filenamePrefix,
});
await generateFetchers(context, {
filenamePrefix,
schemasFiles,
});
},
},
});
Loading

0 comments on commit 79af7b8

Please sign in to comment.