Skip to content

Commit 370ef89

Browse files
committed
chore: adds check script and updates pr checks.
1 parent 3366902 commit 370ef89

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

.github/workflows/check_lesson_03_pr.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ jobs:
2828
- name: Build Lesson 03 with Node.js
2929
working-directory: ./lesson_03/quiz
3030
run: |
31-
npm run lint
32-
npm run test
31+
npm run ci
32+
npm run check

.github/workflows/check_push.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,14 @@ jobs:
4545
4646
- name: Build Lesson 02 with Node.js
4747
working-directory: ./lesson_02/quiz
48-
run: node run compile
48+
run: |
49+
npm ci
50+
node run compile
4951
5052
- name: Build Lesson 03 with Node.js
5153
working-directory: ./lesson_03/quiz
5254
run: |
55+
npm ci
5356
npm run compile
5457
npm run lint
5558

lesson_03/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ npm install
3232
npm start
3333
```
3434
2. You will create a quiz file in the [quizzes folder][quizzes-folder]. You should model yours after the example provided in [anthony_mays_quiz.ts][quiz-example]. Note that the name of the file you create should match the name of the class in the file.
35-
3. Make sure to provide a unique provider name for your questions provider. You'll need this name to provide answers in step 4.
35+
3. Make sure to provide a unique provider name for your questions provider. You'll need this name to provide answers in step 5.
3636
```typescript
3737
getProviderName(): string {
3838
return '<your unique name goes here>';
@@ -41,10 +41,9 @@ npm start
4141
4. Make at least three questions for your quiz and _leave them unanswered_.
4242
5. To provide answers, you will need to update the [quiz.yaml][test-config-file] file in the test directory. You can copy the example in the file to get started, but you must provide your own answers. To generate an encrypted answer, use [bcrypt.online](https://bcrypt.online).
4343
6. Lastly, you'll need to modify the [quizzes.module.ts][quizzes-module] file to include your quiz.
44-
7. Before attempting to submit your quiz, make sure to run the formatter on the code and run the tests to ensure that you've updated things correctly. These commands must be run from the [quiz][quiz-folder] sub-folder just like the previous assignment:
44+
7. Before attempting to submit your quiz, make sure to run the linter on the code and run the tests to ensure that you've updated things correctly. The commands must be run from the [quiz][quiz-folder] sub-folder just like the previous assignment:
4545
```bash
46-
npm run lint
47-
npm run test
46+
npm run check
4847
```
4948
8. Once everything passes, submit a PR.
5049

lesson_03/quiz/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"compile": "tsc -p tsconfig.build.json",
1313
"prepare": "npm run compile",
1414
"pretest": "npm run compile",
15-
"prestart": "npm run compile"
15+
"prestart": "npm run compile",
16+
"check": "npm run lint && npm run test"
1617
},
1718
"author": "",
1819
"license": "ISC",
@@ -42,4 +43,4 @@
4243
"reflect-metadata": "^0.2.2",
4344
"rxjs": "^7.8.1"
4445
}
45-
}
46+
}

0 commit comments

Comments
 (0)