Skip to content

Commit

Permalink
[TH2-5015] added test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita-Smirnov-Exactpro committed Sep 21, 2023
1 parent ab2c465 commit 8974255
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
app: ${{ steps.filter.outputs.app }}
grpc: ${{ steps.filter.outputs.grpc }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
Expand Down
83 changes: 83 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: test

on:
push:
branches-ignore:
- master
- version-*
paths-ignore:
- README.md
- LICENSE
- .gitignore

jobs:
changes:
name: Collect changed files
runs-on: ubuntu-20.04
outputs:
app: ${{ steps.filter.outputs.app }}
grpc: ${{ steps.filter.outputs.grpc }}
steps:
- uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
app:
- 'gradle.properties'
grpc:
- 'grpc/gradle.properties'
grpc-version:
name: Extract gRPC version
needs:
- changes
if: ${{ needs.changes.outputs.grpc == 'true' }}
uses: th2-net/.github/.github/workflows/compound-prebuild-java-workflow.yml@main
with:
project-path: grpc
build-and-publish-grpc-java:
name: Build and publish Java gRPC distributions
runs-on: 'ubuntu-20.04'
needs:
- changes
if: ${{ needs.changes.outputs.grpc == 'true' }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 'zulu' '11'
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '11'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build with Gradle
run: ./gradlew --info -Pversion_suffix='dev' clean build

build-and-publish-grpc-python:
name: Build and publish Python distributions to PyPI
needs:
- build-and-publish-grpc-java
- grpc-version
- changes
if: ${{ needs.changes.outputs.grpc == 'true' }}
uses: th2-net/.github/.github/workflows/compaund-python-grpc-pypi-publication.yml@main
with:
custom-version: ${{ needs.grpc-version.outputs.version }}rc1
project-path: grpc

publish-docker:
name: Build and publish docker image
if: |
always() &&
(needs.changes.outputs.app == 'true' || needs.changes.outputs.grpc == 'true')
needs:
- build-and-publish-grpc-python
- build-and-publish-grpc-java
- app-version
uses: th2-net/.github/.github/workflows/compaund-java-docker-push.yml@main
with:
docker-username: ${{ github.actor }}
version: ${{ needs.app-version.outputs.version }}-dev
versionNumber: ${{ needs.app-version.outputs.version }}
dockerContext: '.'
gradleParameters: '["clean", "build", "dockerPrepare"]'

0 comments on commit 8974255

Please sign in to comment.