-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (52 loc) · 1.74 KB
/
classroom.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: GitHub Classroom Workflow
on:
push:
branches:
- '*'
- '!badges'
jobs:
build:
name: FM4SE-Exercise-4 | SMT Automatic Encoding
runs-on: ubuntu-latest
if: github.actor != 'github-classroom[bot]'
steps:
- name: Checkout Starter Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Execute tests
run: curl -s https://gist.githubusercontent.com/soaibsafi/46de3a7621f2a9acf13c5a992b983ba0/raw/9fb6ff8f1602a0b757565c97e854447dd632bf4b/java_smt_tests.sh | bash -s
- name: Set up Java 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Display Java version
run: java -version
- name: Grading
uses: education/autograding@v1
id: autograder
continue-on-error: true
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
# Generate Report
- run: python generate_report.py
# switch to badges branch
- run: git checkout badges || git checkout -b badges
# create points bar
- name: points bar
uses: markpatterson27/points-bar@v1
with:
points: ${{ steps.autograder.outputs.points }}
path: '.github/badges/points-bar.svg'
# commit and push badges if badges have changed
- name: Commit changes to points bar
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add '.github/badges/points-bar.svg'
git add 'report.md'
git commit -m "Add/Update report" || exit 0
git push -f origin badges