Skip to content

Commit e1232d7

Browse files
author
gabriele.sisinna
committed
Add GitHub Actions CI workflow
1 parent 82ee0bd commit e1232d7

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 15
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Java 17
20+
uses: actions/setup-java@v4
21+
with:
22+
distribution: temurin
23+
java-version: '17'
24+
cache: gradle
25+
26+
- name: Make Gradle wrapper executable
27+
run: chmod +x gradlew
28+
29+
- name: Run tests
30+
run: ./gradlew test --no-daemon

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,16 @@ curl -X POST http://localhost:8080/api/students \
9595
./gradlew test
9696
```
9797

98+
## GitHub CI
99+
100+
This repo includes a GitHub Actions workflow at `.github/workflows/ci.yml`.
101+
102+
It runs on every push and pull request, sets up Java 17, and executes:
103+
104+
```bash
105+
./gradlew test --no-daemon
106+
```
107+
98108
## What to edit first
99109

100110
1. In `Student.java`, change how `level()` works.

0 commit comments

Comments
 (0)