-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (53 loc) · 1.7 KB
/
autograder.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
name: QMD Autograder
on: [push]
jobs:
check-repository-structure:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- run: pip install --upgrade pip
- run: pip install -e .
- run: python quartoquest/repo_structure_check.py
render-qmd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python and Quarto environment
run: |
sudo apt-get update && sudo apt-get install -y wget
wget -q -O quarto.deb https://github.com/quarto-dev/quarto-cli/releases/download/v1.1.189/quarto-1.1.189-linux-amd64.deb
sudo dpkg -i quarto.deb
python -m pip install --upgrade pip
- name: Find .qmd file in docs and render to HTML
run: |
qmd_file=$(find docs -name "*.qmd" -print -quit)
if [[ -n "$qmd_file" ]]; then
quarto render "$qmd_file"
html_file="${qmd_file%.*}.html"
if [[ -f "$html_file" ]]; then
echo "Rendered HTML file: $html_file"
else
echo "Failed to render HTML file" >&2
exit 1
fi
else
echo "No .qmd file found in docs"
exit 1
fi
- uses: actions/upload-artifact@v2
with:
name: rendered-html
path: '**/*.html'
run-other-autograder-tasks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- run: pip install --upgrade pip
- run: pip install -e .
- run: python quartoquest/autograder.py