Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
8969afd
chore(deps): bump tar from 4.4.13 to 4.4.19 (#1946)
dependabot[bot] Feb 27, 2023
d05b902
chore: set v100.0.0
janhenrikoverland Mar 1, 2023
e84a027
feat: support non-gregorian fixed periods (#2233)
kabaros Mar 1, 2023
e5843ce
chore: prepare app for continuous delivery
janhenrikoverland Mar 9, 2023
0f3154d
fix: remove old i18n initialisation (#2241)
edoardo Mar 10, 2023
a862101
fix: dependency updates (#2243)
edoardo Mar 15, 2023
1f25725
fix: set height on chart container when not defined (#2246)
edoardo Mar 15, 2023
2df9e03
fix: update cli-app-scripts and analytics (#2247)
edoardo Mar 21, 2023
c880faa
chore: add styled-jsx which is a peer dependency (#2253)
jenniferarnesen Mar 30, 2023
092d840
chore(deps): bump webpack from 5.74.0 to 5.76.2 (#2248)
dependabot[bot] Mar 30, 2023
418d9f3
chore(deps): bump async from 2.6.3 to 2.6.4 (#2148)
dependabot[bot] Mar 30, 2023
88c9ba7
chore(deps): bump moment from 2.29.2 to 2.29.4 (#2122)
dependabot[bot] Mar 30, 2023
1c24882
fix: target window.parent for postRobot communication (#2256)
edoardo Mar 31, 2023
468c274
chore(deps): bump ansi-regex from 3.0.0 to 3.0.1 (#2191)
dependabot[bot] Mar 31, 2023
406deb5
chore(deps): bump @sideway/formula from 3.0.0 to 3.0.1 (#2245)
dependabot[bot] Mar 31, 2023
5b9a90e
chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 (#2234)
dependabot[bot] Mar 31, 2023
be213e3
chore(deps): bump json5 from 1.0.1 to 1.0.2 (#2228)
dependabot[bot] Mar 31, 2023
672fb69
chore(deps): bump qs from 6.5.2 to 6.5.3 (#2220)
dependabot[bot] Mar 31, 2023
19375fd
chore(deps): bump handlebars from 4.7.6 to 4.7.7 (#1995)
dependabot[bot] Mar 31, 2023
d519d74
chore(deps): bump trim-off-newlines from 1.0.1 to 1.0.3 (#1988)
dependabot[bot] Mar 31, 2023
01fb4fe
fix(translations): sync translations from transifex (master) (#2192)
dhis2-bot Mar 31, 2023
d9f3db4
chore(deps): bump ws from 5.2.2 to 5.2.3 (#1947)
dependabot[bot] Apr 3, 2023
f3f3346
chore(deps): bump tmpl from 1.0.4 to 1.0.5 (#1945)
dependabot[bot] Apr 3, 2023
8c8ef7a
chore: configure continuous delivery workflows (#2254)
jenniferarnesen Apr 14, 2023
18ad584
feat: single value background color change based upon legend (DHIS2-1…
martinkrulltott Apr 20, 2023
4bba44d
fix: inject CSS UI variables in plugin (#2270)
edoardo Apr 20, 2023
13f8096
fix: nightly workflow has to run on default branch which is currently…
jenniferarnesen Apr 20, 2023
19686cd
feat: implement data icon option for SV visualization (DHIS2-10496) (…
edoardo Apr 27, 2023
ee9146b
feat: custom calculations (DHIS2-13871) (#2232)
martinkrulltott Apr 27, 2023
26755e8
chore: bump analytics (#2276)
edoardo May 2, 2023
7c80d57
feat(plugin): send installation status [DHIS2-15097] (#2273)
KaiVandivier May 2, 2023
d378d84
chore: bump analytics (#2279)
edoardo May 3, 2023
23b4b38
chore: converge master-to-dev (#2281)
janhenrikoverland May 3, 2023
1c9546a
test: add extended timeout for file open modal (#2284)
martinkrulltott May 4, 2023
0d188a4
Merge branch 'master' into feat/100.1.0
janhenrikoverland May 5, 2023
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
135 changes: 59 additions & 76 deletions .github/workflows/dhis2-verify-app.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
name: 'dhis2: verify (app)'

# Requirements:
#
# - Org secrets:
# DHIS2_BOT_GITHUB_TOKEN
# DHIS2_BOT_APPHUB_TOKEN
# - Enable the 'jobs.e2e' section if applicable
# - Customize the properties if needed:
# 'jobs.release.steps.*.cwd'
# 'jobs.release.steps.*.build-dir'

on: push
on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']
push:
branches:
- 'master'
- 'dev'

concurrency:
group: ${{ github.workflow}}-${{ github.ref }}
Expand All @@ -26,18 +22,18 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 18.x

- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile
- name: Install
run: yarn install --frozen-lockfile

- name: Build
run: yarn d2-app-scripts build

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: app-build
path: |
Expand All @@ -48,16 +44,14 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 18.x

- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile
- name: Install
run: yarn install --frozen-lockfile

# Can be removed if translations aren't required for tests,
# or if not using the App Platform
- name: Generate translations
run: yarn d2-app-scripts i18n generate

Expand All @@ -67,79 +61,51 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 18.x

- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile
- name: Install
run: yarn install --frozen-lockfile

# Can be removed if translations aren't required for tests,
# or if not using the App Platform
- name: Generate translations
run: yarn d2-app-scripts i18n generate

- name: Test
run: yarn d2-app-scripts test

e2e:
runs-on: ubuntu-latest
if: "!github.event.push.repository.fork && github.actor != 'dependabot[bot]'"

strategy:
fail-fast: false
matrix:
containers: [1, 2, 3, 4]

steps:
- name: Checkout
uses: actions/checkout@v2

- uses: actions/setup-node@v1
with:
node-version: 14.x

- name: End-to-End tests
uses: cypress-io/github-action@v2
with:
start: yarn d2-app-scripts start
wait-on: 'http://localhost:3000'
wait-on-timeout: 300
record: true
video: true
parallel: true
browser: chrome
headless: true
env:
BROWSER: none
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
CYPRESS_dhis2BaseUrl: ${{ secrets.CYPRESS_DHIS2_BASE_URL_DEV }}
CYPRESS_dhis2Username: ${{ secrets.CYPRESS_DHIS2_USERNAME }}
CYPRESS_dhis2Password: ${{ secrets.CYPRESS_DHIS2_PASSWORD }}
CYPRESS_networkMode: live
call-workflow-e2e-prod:
needs: [build, lint, test]
uses: ./.github/workflows/e2e-prod.yml
secrets:
baseurl: ${{ secrets.CYPRESS_DHIS2_BASE_URL_DEV }}
username: ${{ secrets.CYPRESS_DHIS2_USERNAME }}
password: ${{ secrets.CYPRESS_DHIS2_PASSWORD }}
recordkey: ${{ secrets.CYPRESS_RECORD_KEY }}

release:
runs-on: ubuntu-latest
needs: [build, lint, test, e2e]
if: "!github.event.push.repository.fork && github.actor != 'dependabot[bot]'"
needs: call-workflow-e2e-prod
if: |
!github.event.push.repository.fork &&
github.actor != 'dependabot[bot]' &&
github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}

- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: 18.x

- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: app-build

# ensure that d2-app-scripts is available
- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile
- name: Install
run: yarn install --frozen-lockfile

- uses: dhis2/action-semantic-release@master
with:
Expand All @@ -152,3 +118,20 @@ jobs:
with:
build-dir: build/app
github-token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}

report-release-failure:
runs-on: ubuntu-latest
needs: release
if: |
failure() &&
!cancelled() &&
github.ref == 'refs/heads/master'
steps:
- name: Send failure message to analytics-internal-bot slack channel
id: slack
uses: slackapi/[email protected]
with:
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
slack-message: ':small_red_triangle_down: Data-visualizer-app release <https://github.com/dhis2/data-visualizer-app/actions/workflows/dhis2-verify-app.yml?query=branch%3Amaster+is%3Afailure>'
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
76 changes: 76 additions & 0 deletions .github/workflows/e2e-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: 'e2e-dev'

on:
workflow_call:
secrets:
baseurl:
required: true
username:
required: true
password:
required: true
recordkey:
required: true

concurrency:
group: e2e-dev-${{ github.workflow}}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
compute-dev-version:
if: "!github.event.push.repository.fork && (github.event.pull_request.draft == false || github.action == 'workflow_dispatch')"
runs-on: ubuntu-latest
outputs:
version: ${{ steps.instance-version.outputs.version }}
steps:
- name: Output dev version
id: instance-version
uses: dhis2/action-instance-version@v1
with:
instance-url: ${{ secrets.baseurl }}
username: ${{ secrets.username }}
password: ${{ secrets.password }}

e2e-dev:
needs: compute-dev-version
runs-on: ubuntu-latest
container:
image: cypress/browsers:node16.17.0-chrome106
options: --user 1001

strategy:
fail-fast: false
matrix:
containers: [1, 2, 3, 4]

steps:
- name: Checkout
uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Run e2e tests
uses: cypress-io/github-action@v5
with:
start: yarn d2-app-scripts start
wait-on: 'http://localhost:3000'
wait-on-timeout: 300
record: true
parallel: true
browser: chrome
group: e2e-chrome-parallel-dev
env:
BROWSER: none
CYPRESS_RECORD_KEY: ${{ secrets.recordkey }}
CYPRESS_dhis2BaseUrl: ${{ secrets.baseurl }}
CYPRESS_dhis2InstanceVersion: ${{ needs.compute-dev-version.outputs.version }}
CYPRESS_dhis2Username: ${{ secrets.username }}
CYPRESS_dhis2Password: ${{ secrets.password }}
CYPRESS_networkMode: live
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
119 changes: 119 additions & 0 deletions .github/workflows/e2e-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: 'e2e-prod'

# Requirements:
#
# - Customize environment variables:
# BASE_URL_INSTANCES: Set the base url for the instances, e.g. https://test.e2e.dhis2.org
# NAME_PATTERN_PROD_INSTANCES: Set the name pattern for your instances. {version} will be replaced by "[majorVersion].[minorVersion]"
# NAME_PATTERN_DEV_INSTANCE: Set the name pattern for your dev instance. {version} will be replaced by "dev"
#
# - Other optional customizations:
# containers: Set the matrix containers array for the e2e-prod job. The number of parallel Cypress instances running for each backend version will equal the array length.
#
# - Set status check as required:
# We recommend setting "e2e-tests-success" as a required step in your workflow.

on:
workflow_call:
secrets:
baseurl:
required: true
username:
required: true
password:
required: true
recordkey:
required: true

env:
BASE_URL_INSTANCES: https://test.e2e.dhis2.org
NAME_PATTERN_PROD_INSTANCES: 'analytics-{version}'
NAME_PATTERN_DEV_INSTANCE: analytics-dev

concurrency:
group: e2e-prod-${{ github.workflow}}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
compute-prod-versions:
if: "!github.event.push.repository.fork && (github.event.pull_request.draft == false || github.action == 'workflow_dispatch')"
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.prod-versions.outputs.versions }}
steps:
- name: Compute dev instance url
id: instance-url
run: |
url=${BASE_URL_INSTANCES%/}/${NAME_PATTERN_DEV_INSTANCE/"{version}"/dev}
echo "url=$url" >> $GITHUB_OUTPUT
echo "url: $url"

- uses: actions/checkout@v3

- name: Output prod version urls
id: prod-versions
uses: dhis2/action-supported-legacy-versions@v1
with:
instance-url-latest: ${{ steps.instance-url.outputs.url }} # can be removed if maxDHIS2Version has been specified
username: ${{ secrets.username }}
password: ${{ secrets.password }}

e2e-prod:
needs: compute-prod-versions
runs-on: ubuntu-latest
container:
image: cypress/browsers:node16.17.0-chrome106
options: --user 1001
strategy:
fail-fast: false
matrix:
versions: ${{ fromJSON(needs.compute-prod-versions.outputs.versions) }}
containers: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Compute prod instance url
id: instance-url
run: |
url=${BASE_URL_INSTANCES%/}/${NAME_PATTERN_PROD_INSTANCES/"{version}"/$version}
echo "url=$url" >> $GITHUB_OUTPUT
echo "url: $url"
env:
version: ${{ matrix.versions }}

- name: Run e2e tests
uses: cypress-io/github-action@v5
with:
start: yarn d2-app-scripts start
wait-on: 'http://localhost:3000'
wait-on-timeout: 300
record: true
parallel: true
browser: chrome
group: e2e-chrome-parallel-${{ matrix.versions }}
env:
CI: true
BROWSER: none
CYPRESS_RECORD_KEY: ${{ secrets.recordkey }}
CYPRESS_dhis2BaseUrl: ${{ steps.instance-url.outputs.url }}
CYPRESS_dhis2InstanceVersion: ${{matrix.versions}}
CYPRESS_dhis2Username: ${{ secrets.username }}
CYPRESS_dhis2Password: ${{ secrets.password }}
CYPRESS_networkMode: live
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

e2e-tests-success:
needs: e2e-prod
if: ${{ success() || failure() }}
runs-on: ubuntu-latest
steps:
- run: if [ $result != 'success' ]; then exit 1; fi;
env:
result: ${{ needs.e2e-prod.result }}
Loading