Skip to content

Commit

Permalink
test: Use GITHUB_ENV to export services's properties
Browse files Browse the repository at this point in the history
  • Loading branch information
jmatsu committed Oct 16, 2024
1 parent 1fbb668 commit 05d1109
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ jobs:
--health-timeout 5s
--health-retries 5
--health-start-period 20s
env:
TEST_SERVER_URL: 'http://localhost:${{ job.services.app.ports[3000] }}'
steps:
- run: |
echo 'TEST_SERVER_URL=http://localhost:${{ job.services.app.ports[3000] }}' >> $GITHUB_ENV
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-java
- run: ./gradlew publishToMavenLocal test
Expand Down Expand Up @@ -63,9 +63,9 @@ jobs:
--health-timeout 5s
--health-retries 5
--health-start-period 20s
env:
TEST_SERVER_URL: 'http://localhost:3000'
steps:
- run: |
echo 'TEST_SERVER_URL=http://localhost:${{ job.services.app.ports[3000] }}' >> $GITHUB_ENV
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-java
- run: ./gradlew testUnrollAcceptanceTest
Expand Down Expand Up @@ -149,11 +149,11 @@ jobs:
- agp_version: '8.7.0'
gradle_version: '8.9'
java_version: '17'
env:
TEST_SERVER_URL: 'http://localhost:${{ job.services.app.ports[3000] }}'
TEST_AGP_VERSION: ${{ matrix.agp_version }}
TEST_GRADLE_VERSION: ${{ matrix.gradle_version }}
steps:
- run: |
echo 'TEST_SERVER_URL=http://localhost:${{ job.services.app.ports[3000] }}' >> $GITHUB_ENV
echo 'TEST_AGP_VERSION=${{ matrix.agp_version }}' >> $GITHUB_ENV
echo 'TEST_GRADLE_VERSION=${{ matrix.gradle_version }}' >> $GITHUB_ENV
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-java
with:
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ jobs:
--health-timeout 5s
--health-retries 5
--health-start-period 20s
env:
TEST_SERVER_URL: 'http://localhost:${{ job.services.app.ports[3000] }}'
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }}
steps:
- run: |
echo 'TEST_SERVER_URL=http://localhost:${{ job.services.app.ports[3000] }}' >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
ref: master
Expand All @@ -46,6 +44,9 @@ jobs:
EOF
- name: Publish artifacts
run: ./release.sh
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }}
- name: Slack Notification
# we use specific version(v2.2.1) for avoid nested dependency
uses: rtCamp/action-slack-notify@b24d75fe0e728a4bf9fc42ee217caa686d141ee8 # v2.2.1
Expand Down

0 comments on commit 05d1109

Please sign in to comment.