-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (29 loc) · 779 Bytes
/
Copy pathc-cpp.yml
File metadata and controls
37 lines (29 loc) · 779 Bytes
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
name: Autograding
on:
push:
branches: [ "main" ]
paths-ignore:
- '**.md'
- 'LICENSE'
pull_request:
branches: [ "main" ]
workflow_dispatch:
env:
name: "${{ github.actor }}"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check test and generate results
run: make save-test-results
- name: Send POST request with JSON data
run: |
cat ./build/test_results.json
grade_json=$(cat ./build/test_results.json | sed "s/testName/$name/")
# use curl send POST
curl -X POST http://117.72.112.62:8080/api/updateGrade \
-H "Content-Type: application/json" \
-d "$grade_json"
- name: clear all
run: make clean