-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.31 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
name: Autograding Tests
on:
push:
branches: ["main"]
permissions:
checks: write
actions: read
contents: read
jobs:
run-autograding-tests:
runs-on: ubuntu-latest
if: github.actor != 'github-classroom[bot]' && github.run_number != 1 && !contains(github.event.repository.name, 'template')
env:
BASE_COMMAND: dotnet test --nologo --no-restore --no-build
steps:
- uses: actions/checkout@v4
- name: Restore .NET packages
uses: actions/cache/restore@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
- run: dotnet restore -v:q --locked-mode
- run: dotnet build --no-restore -v:q
- id: test-suite
name: Running Test Suite
uses: classroom-resources/autograding-command-grader@v1
with:
test-name: Test Suite 1
command: ${{ env.BASE_COMMAND }}
max-score: 1
- name: Autograding Reporter
uses: classroom-resources/autograding-grading-reporter@v1
env:
TEST_RESULTS: "${{steps.test-suite.outputs.result}}"
with:
runners: Test
- name: Save .NET packages
if: always()
uses: actions/cache/save@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}