Skip to content

Commit

Permalink
Fix typo + add build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabau committed Oct 20, 2023
1 parent d8965e0 commit bfe13f4
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI
on: [push]
# Simple CI/CD for building
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x

- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install # will run `yarn install` command
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # if needed
- name: Run prisma push
uses: borales/actions-yarn@v4
with:
cmd: prisma:generate

- name: Build production bundle
uses: borales/actions-yarn@v4
with:
cmd: build # will run `yarn build:prod` command
4 changes: 2 additions & 2 deletions src/hooks/useQuestions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type UseQuestionsReturn = {
/**
* Submits code with the given language and number
*/
runSelecteTestCase: (code: string) => void;
runSelectedTestCase: (code: string) => void;
/**
* Indicates if the submitted code is still running
*/
Expand Down Expand Up @@ -141,7 +141,7 @@ export default function useQuestions(): UseQuestionsReturn {
output,
questionTitleList: questions,
currentQuestion: question.data,
runSelecteTestCase(code) {
runSelectedTestCase(code) {
if (questionId && environmentId && testCaseId) {
runTestCase.mutate({ testCaseId, source_code: code });
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/collab/rooms/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ const Room = () => {

function runTest() {
// run test
useQuestionObject.runSelecteTestCase(codeSession[0].toString());
useQuestionObject.runSelectedTestCase(codeSession[0].toString());
}

return (
Expand Down

0 comments on commit bfe13f4

Please sign in to comment.