-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path19359.yml
63 lines (60 loc) · 2.1 KB
/
19359.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: WD301 - L2 Milestone
on:
push:
branches: ["submission-*"]
env:
REVIEW_END_POINT: ${{ secrets.REVIEW_END_POINT }}
REVIEW_BOT_USER_TOKEN: ${{ secrets.REVIEW_BOT_USER_TOKEN }}
jobs:
tests:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout student repo and verify its structure
id: check-student-repo
uses: pupilfirst/check-repo-action@v1
with:
repoPath: submission
globs: |-
.gitignore
hello-react/public/*
hello-react/src/App.tsx
hello-react/src/index.css
hello-react/src/index.tsx
hello-react/src/reportWebVitals.js
hello-react/src/TaskCard.tsx
hello-react/src/TaskCard.css
hello-react/tailwind.config.js
hello-react/package.json
hello-react/package-lock.json
hello-react/tsconfig.json
- name: Check out the tests repo
if: steps.check-student-repo.outputs.result == 'success'
uses: actions/checkout@v2
id: checkout-tests-repo
with:
repository: pupilfirst/wd301-tests
path: tests
- name: Copy submission files to tests folder
if: steps.checkout-tests-repo.outcome == 'success'
id: copy-submission-files
run: |
cp tests/helpers/generateReportFromResults.js tests/l2/generateReportFromResults.js
cp -rn submission/hello-react/src/* tests/l2/src/
- name: Run tests using merged code
continue-on-error: true
if: steps.copy-submission-files.outcome == 'success'
timeout-minutes: 2
run: |
cd tests/l2
npm install
npm run test
- name: Use Node.js to generate report
if: steps.copy-submission-files.outcome == 'success'
id: generate-report
run: cd tests/l2 && node generateReportFromResults.js
- name: Grade the submission based on test results
uses: pupilfirst/grade-action@v1
if: steps.generate-report.outcome == 'success'
with:
report_file_path: "tests/l2/report.json"