diff --git a/.github/workflows/main.properties.json b/.github/workflows/main.properties.json new file mode 100644 index 0000000..d46ff7b --- /dev/null +++ b/.github/workflows/main.properties.json @@ -0,0 +1,6 @@ +{ + "name": "Test using maven", + "description": "Runs maven tests for the entire project", + "iconName": "maven", + "categories": ["Continuous integration", "Java", "Maven"] +} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..268925a --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,29 @@ +# This workflow will run maven tests when changes are pushed on main, or whenever a pull request is initiated. + +name: Maven Tests +on: + push: + branches: [main] + pull_request: + branches: [ "main" ] + workflow_dispatch: + +jobs: + build: + runs-on: [self-hosted] + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 25 + uses: actions/setup-java@v4 + with: + java-version: '25' + distribution: 'temurin' + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: Run tests + run: mvn clean test diff --git a/pom.xml b/pom.xml index 145832a..40a54a1 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ edu.ntnu.idi.idatt2003.g40.mappe mappe - 1.0-SNAPSHOT + 1.1-SNAPSHOT 25 @@ -56,4 +56,31 @@ + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.14.1 + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.5.4 + + + + org.openjfx + javafx-maven-plugin + 0.0.8 + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.12.0 + + + \ No newline at end of file