Skip to content

Commit

Permalink
ci: launch test workflow also on release and bugfix branches
Browse files Browse the repository at this point in the history
  • Loading branch information
ndr-brt committed Aug 22, 2024
1 parent 6038f92 commit 156090f
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 204 deletions.
50 changes: 0 additions & 50 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .github/workflows/dependency-check.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Prepare Release

on:
workflow_dispatch:
inputs:
version:
description: the version to be released. If it ends with '.0' a proper release is created, bugfix otherwise
required: true
type: string

jobs:
Prepare-Release:
uses: eclipse-edc/.github/.github/workflows/technology-prepare-release.yml@main
secrets: inherit
with:
version: ${{ inputs.version }}
75 changes: 0 additions & 75 deletions .github/workflows/release-tech-hc.yml

This file was deleted.

10 changes: 10 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Release

on:
workflow_dispatch:


jobs:
Release:
uses: eclipse-edc/.github/.github/workflows/technology-release.yml@main
secrets: inherit
78 changes: 13 additions & 65 deletions .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
push:
pull_request:
branches: [ main ]
branches: [ main, release/*, bugfix/* ]
paths-ignore:
- '**.md'
- 'docs/**'
Expand All @@ -17,43 +17,38 @@ concurrency:

jobs:
Checkstyle:
permissions:
id-token: write
checks: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: eclipse-edc/.github/.github/actions/setup-build@main

- name: Run Checkstyle
run: ./gradlew checkstyleMain checkstyleTest

CodeQL:
uses: eclipse-edc/.github/.github/workflows/codeql-analysis.yml@main
secrets: inherit

Dependency-Check:
uses: eclipse-edc/.github/.github/workflows/dependency-check.yml@main
secrets: inherit

Unit-Tests:
runs-on: ubuntu-latest
env:
JACOCO: true
steps:
- uses: actions/checkout@v4
- uses: eclipse-edc/.github/.github/actions/setup-build@main

- name: Run unit tests
uses: eclipse-edc/.github/.github/actions/run-tests@main
with:
command: ./gradlew test jacocoTestReport
run: ./gradlew test

Component-Tests:
env:
JACOCO: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: eclipse-edc/.github/.github/actions/setup-build@main

- name: Component Tests
uses: eclipse-edc/.github/.github/actions/run-tests@main
with:
command: ./gradlew jacocoTestReport -DincludeTags="ComponentTest"
run: ./gradlew -DincludeTags="ComponentTest"

End-To-End-Tests:
runs-on: ubuntu-latest
Expand All @@ -62,60 +57,13 @@ jobs:
- uses: eclipse-edc/.github/.github/actions/setup-build@main

- name: End to End Integration Tests
uses: eclipse-edc/.github/.github/actions/run-tests@main
with:
command: ./gradlew test -DincludeTags="EndToEndTest"
run: ./gradlew test -DincludeTags="EndToEndTest"

API-Tests:
env:
JACOCO: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: eclipse-edc/.github/.github/actions/setup-build@main

- name: Component Tests
uses: eclipse-edc/.github/.github/actions/run-tests@main
with:
command: ./gradlew test jacocoTestReport -DincludeTags="ApiTest"


Upload-Test-Report:
needs:
- Unit-Tests
- End-To-End-Tests
- Component-Tests

permissions:
checks: write
pull-requests: write

runs-on: ubuntu-latest
if: always()
steps:
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
junit_files: "**/test-results/**/*.xml"

Upload-Coverage-Report-To-Codecov:
needs:
- Unit-Tests
- Component-Tests
- API-Tests
runs-on: ubuntu-latest
if: always()
steps:
# Sources are needed for Codecov report
- uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: CodeCov
uses: codecov/codecov-action@v3
run: ./gradlew test -DincludeTags="ApiTest"

0 comments on commit 156090f

Please sign in to comment.