Skip to content

Commit

Permalink
Testing Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
gmagnu committed Nov 7, 2024
1 parent 65fabfb commit 5341a4f
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 25 deletions.
24 changes: 4 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,12 @@ jobs:
distribution: 'temurin'
java-version: 17
cache: 'gradle'
# - name: Setup Gradle
# uses: gradle/actions/setup-gradle@v4
- name: Prepare env
run: |
echo ${INTEGRATION_TESTS_SECRETS_ENV} | base64 -d > tests/config/secrets.env
- name: Build with Gradle
run: |
./gradlew --no-daemon --continue test slowTest integrationTest
#./gradlew :drivers:integrationTest --tests '*ITestBvlMinOnS3.testGorz'
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure() # always run even if the previous step fails
with:
report_paths: '**/TEST-*.xml'
#- "*/*/*/*/TEST-*.xml"
#- "*/*/*/*/*/TEST-*.xml"
- name: Publish snapshot package
if: ${{ github.ref == 'refs/heads/githubtest' }}
#if: github.ref == 'refs/heads/main'
run: ./gradlew --no-daemon publish -x test -x slowTest -x integrationTest -Pinclude.documentation -PpublishToGithub -Pversion=$(cat VERSION)-SNAPSHOT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish release package
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: ./gradlew --no-daemon publish -x test -x slowTest -x integrationTest -Pinclude.documentation -PpublishToGithub -Pversion=$(cat VERSION)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
./gradlew --no-daemon assemble
49 changes: 49 additions & 0 deletions .github/workflows/buildSingleJob.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build Single Job

on:
push:
branches: [githubtest]

env:
INTEGRATION_TESTS_SECRETS_ENV: ${{ secrets.INTEGRATION_TESTS_SECRETS_ENV }}

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'gradle'
- name: Prepare env
run: |
echo ${INTEGRATION_TESTS_SECRETS_ENV} | base64 -d > tests/config/secrets.env
- name: Build with Gradle
run: |
./gradlew --no-daemon --continue test slowTest integrationTest
#./gradlew :drivers:integrationTest --tests '*ITestBvlMinOnS3.testGorz'
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure() # always run even if the previous step fails
with:
report_paths: '**/TEST-*.xml'
#- "*/*/*/*/TEST-*.xml"
#- "*/*/*/*/*/TEST-*.xml"
- name: Publish snapshot package
if: ${{ github.ref == 'refs/heads/githubtest' }}
#if: github.ref == 'refs/heads/main'
run: ./gradlew --no-daemon publish -x test -x slowTest -x integrationTest -Pinclude.documentation -PpublishToGithub -Pversion=$(cat VERSION)-SNAPSHOT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish release package
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: ./gradlew --no-daemon publish -x test -x slowTest -x integrationTest -Pinclude.documentation -PpublishToGithub -Pversion=$(cat VERSION)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/buildTest.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Test
name: Build Single Workflow

#on: [push]
on:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/publish_snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: Publish Snapshot
on:
workflow_run:
workflows: ["Run Tests"]
tags:
- v*
branches: [githubtest,master]
types:
- completed

Expand All @@ -19,6 +18,8 @@ jobs:
distribution: 'temurin'
java-version: 17
cache: 'gradle'
# - name: Setup Gradle
# uses: gradle/actions/setup-gradle@v4
- name: Publish release package
run: ./gradlew publish -x test -x slowTest -x integrationTest -Pinclude.documentation -PpublishToGithub -Pversion=$(cat VERSION)-SNAPSHOT
env:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/publish_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name: Publish Version
on:
workflow_run:
workflows: ["Run Tests"]
branches: [githubtest]
tags:
- v*
types:
- completed

Expand All @@ -18,6 +19,8 @@ jobs:
distribution: 'temurin'
java-version: 17
cache: 'gradle'
# - name: Setup Gradle
# uses: gradle/actions/setup-gradle@v4
- name: Publish snapshot package
run: ./gradlew publish -x test -x slowTest -x integrationTest -Pinclude.documentation -PpublishToGithub -Pversion=$(cat VERSION)
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Tests
on:
workflow_run:
workflows: ["Build"]
branches: [githubtest]
branches: [githubtest,master]
types:
- completed

Expand Down

0 comments on commit 5341a4f

Please sign in to comment.