Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: report release job of release workflow needs output from the release job #3418

Merged
merged 4 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ env:
GH_TOKEN: ${{secrets.DHIS2_BOT_GITHUB_TOKEN}}
D2_APP_HUB_TOKEN: ${{secrets.DHIS2_BOT_APPHUB_TOKEN}}
CI: true
build_exists: false

jobs:
release:
runs-on: ubuntu-latest
if: >
${{ !github.event.push.repository.fork &&
github.actor != 'dependabot[bot]' }}
outputs:
build_exists: ${{ steps.check_build.outputs.build_exists }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -39,17 +40,17 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}

- name: Set build_exists env var
- name: Set build_exists output
id: check_build
run: |
if ls build/bundle/maps-*.zip 1> /dev/null 2>&1; then
echo "build_exists=true" >> $GITHUB_ENV
echo "build_exists=yes" >> $GITHUB_OUTPUT
else
echo "build_exists=false" >> $GITHUB_ENV
echo "build_exists=no" >> $GITHUB_OUTPUT
fi

- name: Publish to AppHub
if: env.build_exists == 'true'
if: ${{ steps.check_build.outputs.build_exists == 'yes' }}
run: yarn run d2-app-scripts publish

report-release-result:
Expand All @@ -58,19 +59,19 @@ jobs:
needs: release
steps:
- name: Checkout code
if: ${{ env.build_exists == 'true' && success() }}
if: ${{ needs.release.outputs.build_exists == 'yes' && success() }}
uses: actions/checkout@v4
with:
ref: master
fetch-depth: 0

- name: Extract version
if: ${{ env.build_exists == 'true' && success() }}
if: ${{ needs.release.outputs.build_exists == 'yes' && success() }}
id: extract_version
uses: Saionaro/[email protected]

- name: Send success message to analytics-internal-bot slack channel
if: ${{ env.build_exists == 'true' && success() }}
if: ${{ needs.release.outputs.build_exists == 'yes' && success() }}
id: slack_success
uses: slackapi/[email protected]
with:
Expand Down
8 changes: 5 additions & 3 deletions cypress/integration/layers/thematiclayer.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ context('Thematic Layers', () => {
.selectIndicatorGroup('Stock')
.selectIndicator('BCG Stock PHU')
.selectTab('Period')
.selectRelativePeriod('This month')
.selectPeriodType('Start/end dates')
.typeStartDate(`${CURRENT_YEAR}-11-01`)
.typeEndDate(`${CURRENT_YEAR}-11-30`)
.selectTab('Style')
.selectIncludeNoDataOU()
.selectTab('Org Units')
Expand Down Expand Up @@ -138,7 +140,7 @@ context('Thematic Layers', () => {
cy.get('#dhis2-map-container')
.findByDataTest('dhis2-uicore-componentcover', EXTENDED_TIMEOUT)
.should('not.exist')
cy.get('.dhis2-map').click('center') //Click somewhere on the map
cy.get('.dhis2-map').click('center') //Click in the middle of the map

cy.get('.maplibregl-popup').contains('Value: 0').should('be.visible')

Expand All @@ -159,7 +161,7 @@ context('Thematic Layers', () => {
cy.get('#dhis2-map-container')
.findByDataTest('dhis2-uicore-componentcover', EXTENDED_TIMEOUT)
.should('not.exist')
cy.get('.dhis2-map').click('center') //Click somewhere on the map
cy.get('.dhis2-map').click('center') //Click in the middle of the map

cy.get('.maplibregl-popup')
.contains('Value: No data')
Expand Down
Loading