generated from bmstu-rsoi/lab2-template
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (60 loc) · 1.94 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
64
65
66
67
68
name: GitHub Classroom Workflow
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: Autograding
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: docker/setup-buildx-action@v2
- name: Build images
timeout-minutes: 10
run: docker compose build
- name: Run containers
timeout-minutes: 5
run: |
docker compose up -d
./scripts/wait-script.sh
env:
WAIT_PORTS: 8080,8070,8060,8050
- name: My unit tests
run: |
curl http://localhost:8080/test?id_test=get_books.php
curl http://localhost:8080/test?id_test=get_libraries.php
curl http://localhost:8080/test?id_test=get_rating.php
curl http://localhost:8080/test?id_test=post_reservations.php
curl http://localhost:8080/test?id_test=get_reservations.php
curl http://localhost:8080/test?id_test=post_return_book.php
curl http://localhost:8080/test?id_test=get_rating.php
curl http://localhost:8080/test?id_test=drop_all_tables.php
- name: Run API Tests
uses: matt-ball/newman-action@master
with:
collection: v4/postman/collection.json
environment: v4/postman/environment.json
delayRequest: 100
reporters: '[ "cli" ]'
- uses: education/autograding@v1
id: autograder
continue-on-error: true
- name: Github auto grader mark
uses: Romanow/[email protected]
with:
google_token: ${{secrets.GOOGLE_API_KEY}}
sheet_id: "1xkgjUX6Qmk7rdJG-QPOToav-HWWtthJjnShIKnw3oIY"
homework_number: 2
user_column: 'D'
column_offset: 'F'
mark: "'+"
- name: Stop containers
if: always()
continue-on-error: true
run: docker compose down -v