Skip to content

Run Tests

Run Tests #9

Workflow file for this run

name: Test Code (Style, Tests)
on:
workflow_dispatch:
push:
pull_request:
branches: [ main ]
paths-ignore:
- '**.md'
- 'docs/**'
- 'CODEOWNERS'
- 'LICENSE'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Checkstyle:
permissions:
id-token: write
checks: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-build
- name: Run Checkstyle
run: ./gradlew checkstyleMain checkstyleTest
Javadoc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-build
- name: Run Javadoc
run: ./gradlew javadoc
Unit-Tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-build
- name: Run unit tests
uses: ./.github/actions/run-tests
with:
command: ./gradlew test
Trigger-Snapshot:
runs-on: ubuntu-latest
# forks cannot trigger Jenkins
if: github.repository == 'eclipse-edc/Runtime-Metamodel' && github.event_name == 'push'
needs: [Checkstyle, Javadoc, Unit-Tests]
steps:
# Trigger EF Jenkins. This job waits for Jenkins to complete the publishing, which may take a long time, because every
# module is signed individually, and parallelism is not available. Hence, the increased timeout of 3600 seconds.
# There is no way to cancel the process on Jenkins from withing GitHub.
- name: Call Jenkins API to trigger build
uses: toptal/jenkins-job-trigger-action@master
with:
jenkins_url: "https://ci.eclipse.org/edc/"
jenkins_user: ${{ secrets.EF_JENKINS_USER }}
jenkins_token: ${{ secrets.EF_JENKINS_TOKEN }}
# empty params are needed, otherwise the job will fail.
job_params: |
{
"REPO": "https://github.com/eclipse-edc/Runtime-Metamodel"
}
job_name: "Publish-Component"
job_timeout: "3600" # Default 30 sec. (optional)