forked from jusju/lambda-harjoitus
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (29 loc) · 1.06 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
# This file defines a GitHub Actions workflow that runs autograding when a student pushes to their repository.
# For details about tests and points, see the autograding.json file in the .github/classroom/ directory.
name: GitHub Classroom Workflow
on:
- push
- workflow_dispatch
permissions:
checks: write
actions: read
contents: read
jobs:
build:
name: Autograding
runs-on: ubuntu-latest
steps:
# Checkout the repository
- uses: actions/checkout@v4
# Install Java 17. See https://github.com/education/autograding/issues/18
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
# Make sure compilation succeeds before attempting to run autograding
- name: Compile source code
run: ./gradlew compileJava compileTestJava
# Run autograding
- uses: education/autograding@v1
# Only run autograding when a student pushes to their repository
if: github.actor != 'github-classroom[bot]' && github.repository_owner != 'ohjelmointi2'