|
32 | 32 | uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
33 | 33 | with:
|
34 | 34 | path: ~/.m2/repository
|
35 |
| - key: tests-maven-${{ hashFiles('pom.xml') }} |
| 35 | + key: build-maven-${{ hashFiles('pom.xml') }} |
36 | 36 |
|
37 | 37 | - uses: s4u/maven-settings-action@64e42c454dbd42ef6370ac8539685755aedd205b # v3.1.0
|
38 | 38 | with:
|
|
45 | 45 | languages: java
|
46 | 46 | queries: security-and-quality
|
47 | 47 |
|
48 |
| - - name: Download Ontology, Build and Run Tests |
49 |
| - run: mvn -P download-ontology -B verify |
| 48 | + - name: Download Ontology, Build Without Tests |
| 49 | + run: mvn -P download-ontology -B package -DskipTests |
50 | 50 |
|
51 | 51 | - name: Set up Docker Buildx
|
52 | 52 | uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3
|
|
57 | 57 | context: .
|
58 | 58 | tags: torch:latest
|
59 | 59 | outputs: type=docker,dest=/tmp/torch.tar
|
60 |
| - |
61 |
| - - name: Upload Coverage to Codecov |
62 |
| - uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5 |
63 |
| - |
64 | 60 | - name: Perform CodeQL Analysis
|
65 | 61 | uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3
|
66 | 62 |
|
@@ -111,6 +107,36 @@ jobs:
|
111 | 107 | with:
|
112 | 108 | sarif_file: trivy-results.sarif
|
113 | 109 |
|
| 110 | + test: |
| 111 | + needs: build |
| 112 | + runs-on: ubuntu-24.04 |
| 113 | + steps: |
| 114 | + - name: Check out Git repository |
| 115 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 |
| 116 | + |
| 117 | + - name: Set up JDK 21 |
| 118 | + uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4 |
| 119 | + with: |
| 120 | + distribution: 'temurin' |
| 121 | + java-version: 21 |
| 122 | + |
| 123 | + - name: Cache Local Maven Repo |
| 124 | + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4 |
| 125 | + with: |
| 126 | + path: ~/.m2/repository |
| 127 | + key: tests-maven-${{ hashFiles('pom.xml') }} |
| 128 | + |
| 129 | + - uses: s4u/maven-settings-action@64e42c454dbd42ef6370ac8539685755aedd205b # v3.1.0 |
| 130 | + with: |
| 131 | + servers: | |
| 132 | + [{"id": "mii", "username": "${{ github.actor }}", "password": "${{ secrets.GITHUB_TOKEN }}"}] |
| 133 | +
|
| 134 | + - name: Download Ontology and Run Tests |
| 135 | + run: mvn -P download-ontology -B verify |
| 136 | + |
| 137 | + - name: Upload Coverage to Codecov |
| 138 | + uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5 |
| 139 | + |
114 | 140 | blackbox-integration-tests:
|
115 | 141 | needs: build
|
116 | 142 | runs-on: ubuntu-24.04
|
@@ -150,6 +176,7 @@ jobs:
|
150 | 176 |
|
151 | 177 | push-image:
|
152 | 178 | needs:
|
| 179 | + - test |
153 | 180 | - image-scan
|
154 | 181 | - blackbox-integration-tests
|
155 | 182 | runs-on: ubuntu-24.04
|
|
0 commit comments