Skip to content

Commit

Permalink
- Github Actions Test
Browse files Browse the repository at this point in the history
  • Loading branch information
Eukon05 committed Oct 31, 2024
1 parent 152dd4f commit 39d9018
Showing 1 changed file with 28 additions and 14 deletions.
42 changes: 28 additions & 14 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,40 @@ name: Java CI with Maven

on:
push:
branches: [ "prototype" ]
branches: [ "prototype", "actions-test" ]
pull_request:
branches: [ "prototype" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B test --file pom.xml
- uses: actions/checkout@v4
- name: Set up Java 21
run: |
sudo apt-get update
sudo apt-get install -y openjdk-21-jdk
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-21-openjdk-amd64/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-21-openjdk-amd64/bin/javac 1
- name: Install Maven 3.9.6
run: |
wget https://downloads.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz
tar -xvf apache-maven-3.9.6-bin.tar.gz
sudo mv apache-maven-3.9.6 /usr/local/apache-maven
rm apache-maven-3.9.6-bin.tar.gz
sudo update-alternatives --install /usr/bin/mvn mvn /usr/local/apache-maven/bin/mvn 1
- name: Check versions
run: |
java -version
javac -version
mvn -version
- name: Test with Maven
run: mvn -B test --file pom.xml

# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6

0 comments on commit 39d9018

Please sign in to comment.