Skip to content

Commit

Permalink
Merge pull request #399 from mathworks/integ_tests
Browse files Browse the repository at this point in the history
Adding system tests
  • Loading branch information
Vahila authored Feb 11, 2025
2 parents 699d4a7 + b19294f commit 707dece
Show file tree
Hide file tree
Showing 43 changed files with 2,805 additions and 3,573 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: using mpm to install MATLAB
on: push
jobs:
run-tests-job:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
name: Run System tests
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Setup Java 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
cache: maven

- name: Setup MATLAB
id: setup-matlab
uses: matlab-actions/setup-matlab@v2

- name: Running tests
run: mvn --batch-mode verify
env:
MATLAB_ROOT: ${{ steps.setup-matlab.outputs.matlabroot }}
MLM_LICENSE_TOKEN: ${{ secrets.MLM_LICENSE_TOKEN}}
37 changes: 0 additions & 37 deletions azure-pipelines.yml

This file was deleted.

76 changes: 76 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,38 @@
<version>11.0.24</version>
<scope>test</scope>
</dependency>

<!-- Dependencies for system tests -->
<!-- https://mvnrepository.com/artifact/com.jcabi/jcabi-xml -->
<dependency>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-xml</artifactId>
<version>0.23.1</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jenkinsci.plugins/pipeline-model-definition -->
<dependency>
<groupId>org.jenkinsci.plugins</groupId>
<artifactId>pipeline-model-definition</artifactId>
<scope>test</scope>
</dependency>
<!-- Need unzip to add the files in pipeline workspace -->
<!-- https://mvnrepository.com/artifact/org.jenkins-ci.plugins/pipeline-utility-steps -->
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>pipeline-utility-steps</artifactId>
<version>2.7.1</version>
<scope>test</scope>
</dependency>
<!-- TODO: see if this is necessary Using for verifyCodeCoverage -->
<!-- https://mvnrepository.com/artifact/org.jenkins-ci.plugins/cobertura -->
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>cobertura</artifactId>
<version>1.16</version>
<scope>test</scope>
</dependency>

</dependencies>
<build>
<plugins>
Expand Down Expand Up @@ -215,6 +247,50 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.19.1</version>
<executions>
<execution>
<id>integration-tests</id>
<goals>
<goal>integration-test</goal>
</goals>
<configuration>
<includes>
<include>**/*IT.java</include>
</includes>
<excludes>
<exclude>**/*Test.java</exclude>
</excludes>
</configuration>
</execution>
<!-- Add 'verify' goal. This way GA job also fails if there are any integration test failures-->
<execution>
<id>failsafe-verify</id>
<phase>verify</phase>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<includes>
<include>**/*Test.java</include>
<include>**/*Tester.java</include>
</includes>
<excludes>
<exclude>**/*IT.java</exclude>>
</excludes>
</configuration>
</plugin>

</plugins>
<pluginManagement>
<plugins>
Expand Down
Loading

0 comments on commit 707dece

Please sign in to comment.