Merge pull request #31 from RamtinS/feature/27-add-quiz-search #43
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
name: Java CI with Maven | |
on: | |
push: | |
branches: [ "develop" ] | |
pull_request: | |
branches: [ "develop" ] | |
permissions: read-all | |
jobs: | |
checkstyle: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: read | |
# To report GitHub Actions status checks | |
statuses: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
# super-linter needs the full git history to get the | |
# list of files that changed across commits | |
fetch-depth: 0 | |
- name: Super-linter | |
uses: super-linter/super-linter@v6.3.0 # x-release-please-version | |
env: | |
# To report GitHub Actions status checks | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
VALIDATE_JAVA_STANDARD: true | |
build: | |
#The type of container the application will run in. | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- name: Step 1 - Checkout the main branches from Github | |
uses: actions/checkout@v3 | |
- name: Step 2 - Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
cache: maven | |
- name: Step 3 - Build and test with Maven | |
run: mvn -B package --file pom.xml | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Step 1 - Checkout the main branches from Github | |
uses: actions/checkout@v3 | |
- name: Step 2 - Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
cache: maven | |
- name: Step 3 - Run tests with Maven | |
run: mvn test |