Implementing GitHub Actions Pipeline #90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# © 2024. TU Dortmund University, | |
# Institute of Energy Systems, Energy Efficiency and Energy Economics, | |
# Research group Distribution grid planning and operation | |
# | |
name: CI | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
- 'feature/*' | |
- 'hotfix/*' | |
- 'release/*' | |
pull_request: | |
branches: | |
- main | |
- dev | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: gradle:8.10-jdk17 | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref || github.ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} | |
- name: Check Branch & Files | |
run: | | |
git config --global --add safe.directory /__w/simona/simona | |
git rev-parse --abbrev-ref HEAD | |
pwd | |
ls -la | |
- name: Checking Gradle & Java | |
run: | | |
java -version && gradle --version | |
- name: Running Tests | |
run: | | |
./gradlew --no-daemon --info --refresh-dependencies spotlessCheck pmdMain pmdTest test | |
- name: Generate JavaDoc | |
run: | | |
./gradlew javadoc | |
test: | |
needs: build | |
runs-on: ubuntu-latest | |
container: | |
image: gradle:8.10-jdk17 | |
services: | |
docker: | |
image: docker:19.03.12 | |
options: --privileged | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref || github.ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} | |
- name: Running Tests | |
run: | | |
./gradlew --no-daemon --info --refresh-dependencies spotlessCheck pmdMain pmdTest test | |
- name: Generate JavaDoc | |
run: | | |
./gradlew javadoc |