-
Notifications
You must be signed in to change notification settings - Fork 1
83 lines (71 loc) · 2.04 KB
/
hidden-tests.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Hidden Tests
on:
workflow_dispatch:
inputs:
repository:
description: '<owner>/<repository>'
default: 'UBCSailbot/software-quiz'
required: true
type: string
cutest:
description: 'check to run cutest'
default: false
required: false
type: boolean
pytest:
description: 'check to run pytest'
default: false
required: false
type: boolean
jobs:
cutest:
if: ${{ inputs.cutest }}
runs-on: ubuntu-latest
steps:
- name: Checkout src repository
uses: actions/checkout@v4
with:
path: 'src'
repository: '${{ inputs.repository }}'
submodules: 'true'
- name: Checkout solutions repository
uses: actions/checkout@v4
with:
path: 'sol'
repository: 'UBCSailbot/software-quiz-sample-solution'
token: ${{ secrets.GH_TOKEN }}
- name: Copy solutions to src
run: cp sol/c-cpp/test_standard_calc.cpp src/c-cpp
- name: Build src with solutions with Make
run: make -C src/c-cpp
- name: Test src with solutions with CuTest
run: src/c-cpp/test_standard_calc.o > /dev/null 2>&1
pytest:
if: ${{ inputs.pytest }}
runs-on: ubuntu-latest
steps:
- name: Checkout src repository
uses: actions/checkout@v4
with:
path: 'src'
repository: '${{ inputs.repository }}'
submodules: 'true'
- name: Checkout solutions repository
uses: actions/checkout@v4
with:
path: 'sol'
repository: 'UBCSailbot/software-quiz-sample-solution'
token: ${{ secrets.GH_TOKEN }}
- name: Copy solutions to src
run: cp sol/python/test_standard_calc.py src/python
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies with Pip
run: |
python -m pip install --upgrade pip
pip install pytest
- name: Test src with solutions with Pytest
run: |
pytest src > /dev/null 2>&1