Skip to content

Commit 159e51e

Browse files
authored
Update unit.tests.yml
1 parent a857e0f commit 159e51e

1 file changed

Lines changed: 1 addition & 43 deletions

File tree

.github/workflows/unit.tests.yml

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
name: UnitTestsWithCodeCoverageTestAK
22

33
on:
4-
push:
5-
branches: [ "develop" ]
6-
pull_request:
7-
branches: [ "develop" ]
8-
types: [opened, synchronize, reopened, auto_merge_enabled]
94
workflow_dispatch:
105
inputs:
116
file_url:
@@ -19,57 +14,20 @@ on:
1914
default: 'eicar.com.txt'
2015
type: string
2116

22-
permissions:
23-
pull-requests: read
24-
2517
jobs:
26-
unitTests:
18+
download-and-verify:
2719
runs-on: ubuntu-latest
28-
strategy:
29-
matrix:
30-
java-version: [17]
3120
steps:
32-
- name: Checkout repository
33-
uses: actions/checkout@v4
34-
35-
- name: Set up JDK ${{ matrix.java-version }}
36-
uses: actions/setup-java@v4
37-
with:
38-
distribution: 'temurin'
39-
java-version: ${{ matrix.java-version }}
40-
41-
- name: Cache Maven dependencies
42-
uses: actions/cache@v4
43-
with:
44-
path: ~/.m2
45-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
46-
restore-keys: |
47-
${{ runner.os }}-maven-
48-
49-
- name: Install dependencies and run tests with coverage
50-
run: |
51-
mvn clean install -P unit-tests -DskipIntegrationTests
52-
53-
- name: Upload code coverage report
54-
uses: actions/upload-artifact@v4
55-
with:
56-
name: code-coverage-report
57-
path: target/site/jacoco/jacoco.xml
58-
59-
# ── File download + verification (only on workflow_dispatch) ──────────────
6021
- name: Download file from URL
61-
if: github.event_name == 'workflow_dispatch'
6222
run: |
6323
curl -fSL \
6424
"${{ github.event.inputs.file_url }}" \
6525
-o "${{ github.event.inputs.download_path }}"
6626
6727
- name: Wait 30 seconds
68-
if: github.event_name == 'workflow_dispatch'
6928
run: sleep 30
7029

7130
- name: Verify downloaded file
72-
if: github.event_name == 'workflow_dispatch'
7331
run: |
7432
FILE="${{ github.event.inputs.download_path }}"
7533
if [ -f "$FILE" ]; then

0 commit comments

Comments
 (0)