Skip to content

Commit

Permalink
Merge branch 'master' into release-to-master
Browse files Browse the repository at this point in the history
  • Loading branch information
huyenthanh09 authored Dec 20, 2024
2 parents c14c14f + 29b53c5 commit c9371c0
Show file tree
Hide file tree
Showing 209 changed files with 7,674 additions and 2,578 deletions.
28 changes: 22 additions & 6 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,34 @@ Description of changes.
---

> [!IMPORTANT]
> Please, **don't forget to run `rush change`** for the commits that introduce **new features** 🙏
> Please, **don't forget to run `rush change`** for the commits that introduce **new features** or **significant changes** 🙏 This information is used to generate the [change log](https://github.com/gooddata/gooddata-ui-sdk/blob/master/libs/sdk-ui-all/CHANGELOG.md).
---

Refer to [documentation](https://github.com/gooddata/gooddata-ui-sdk/blob/master/dev_docs/continuous_integration.md) to see how to run checks and tests in the pull request. This is the list of the most used commands:
### Run extended test by pull request comment

Commands can be triggered by posting a comment with specific text on the pull request. It is possible to trigger multiple commands simultaneously.

```
extended test - backstop
extended-test --backstop | --integrated | --isolated | --record [--filter <file1>,<file2>,...,<fileN>]
```

#### Explanation

- `--backstop` The command to run screen tests.
- `--integrated` The command to run integrated tests against the live backend.
- `--isolated` The command to run isolated tests against recordings.
- `--record` The command to create new recordings for isolated tests.
- `--filter` (Optional) A comma-separated list of test files to run. This parameter is valid only for the `--integrated`, `--isolated`, and `--record` commands.

#### Examples

```
extended test - integrated
extended test - isolated
extended test - record
extended-test --backstop
extended-test --integrated
extended-test --integrated --filter test1.spec.ts,test2.spec.ts
extended-test --isolated
extended-test --isolated --filter test1.spec.ts,test2.spec.ts
extended-test --record
extended-test --record --filter test1.spec.ts,test2.spec.ts
```
76 changes: 62 additions & 14 deletions .github/workflows/pull-request-comment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- created
jobs:
get-pr-info:
if: github.event.issue.pull_request != null && startsWith(github.event.comment.body, 'extended test')
if: github.event.issue.pull_request != null && startsWith(github.event.comment.body, 'extended-test')
runs-on:
group: infra1-runners-arc
labels: runners-small
Expand All @@ -27,7 +27,7 @@ jobs:

command-started:
needs: [get-pr-info]
if: ${{ startsWith(github.event.comment.body, 'extended test') }}
if: ${{ startsWith(github.event.comment.body, 'extended-test') }}
permissions:
pull-requests: write
runs-on:
Expand All @@ -51,45 +51,93 @@ jobs:
env:
COMMENT: ${{ github.event.comment.body }}

e2e-run-isolated:
extract-filter:
needs: [get-pr-info]
if: ${{ github.event.comment.body == 'extended test - isolated' }}
outputs:
filter: ${{ steps.extract-filter.outputs.filter_output }}
runs-on:
group: infra1-runners-arc
labels: runners-small
steps:
- name: Extract filter
id: extract-filter
run: |
# Allowed commands
commands=("extended-test --isolated" "extended-test --integrated" "extended-test --record")
# Check if the command matches one of the allowed commands
is_valid_command=false
for cmd in "${commands[@]}"; do
if [[ $command_string == $cmd* ]]; then
is_valid_command=true
break
fi
done
# Initialize filter_value as empty
filter_value=""
if $is_valid_command; then
# Extract the --filter value if present
filter_pattern="--filter ([^ ]+)"
if [[ $command_string =~ $filter_pattern ]]; then
filter_value=${BASH_REMATCH[1]}
fi
fi
# Output the filter value if set
if [[ -n $filter_value ]]; then
echo "Filter value: $filter_value"
echo "filter_output=$filter_value" >> $GITHUB_OUTPUT
else
echo "No filter found."
fi
env:
command_string: ${{ github.event.comment.body }}


e2e-run-isolated:
needs: [get-pr-info,extract-filter]
if: ${{ startsWith(github.event.comment.body, 'extended-test --isolated') }}
permissions:
id-token: write
contents: read
pull-requests: read
uses: ./.github/workflows/rw-rush-build-e2e-tests.yml
with:
source-ref: ${{ needs.get-pr-info.outputs.sha }}
filter: ${{ needs.extract-filter.outputs.filter }}
secrets: inherit

e2e-record:
needs: [get-pr-info]
if: ${{ github.event.comment.body == 'extended test - record' }}
needs: [get-pr-info,extract-filter]
if: ${{ startsWith(github.event.comment.body, 'extended-test --record') }}
permissions:
id-token: write
contents: read
pull-requests: read
uses: ./.github/workflows/rw-rush-build-e2e-tests-record.yml
with:
source-ref: ${{ needs.get-pr-info.outputs.sha }}
filter: ${{ needs.extract-filter.outputs.filter }}
secrets: inherit

e2e-integrated:
needs: [get-pr-info]
if: ${{ github.event.comment.body == 'extended test - integrated' }}
needs: [get-pr-info,extract-filter]
if: ${{ startsWith(github.event.comment.body, 'extended-test --integrated') }}
permissions:
id-token: write
contents: read
pull-requests: read
uses: ./.github/workflows/rw-rush-build-e2e-tests-integrated.yml
with:
source-ref: ${{ needs.get-pr-info.outputs.sha }}
filter: ${{ needs.extract-filter.outputs.filter }}
secrets: inherit

e2e-backstop:
needs: [get-pr-info]
if: ${{ github.event.comment.body == 'extended test - backstop' }}
if: ${{ startsWith(github.event.comment.body, 'extended-test --backstop') }}
permissions:
id-token: write
contents: read
Expand All @@ -103,7 +151,7 @@ jobs:
permissions:
pull-requests: write
needs: [e2e-run-isolated,e2e-record,e2e-integrated,e2e-backstop]
if: ${{ !cancelled() && startsWith(github.event.comment.body, 'extended test') }}
if: ${{ !cancelled() && startsWith(github.event.comment.body, 'extended-test') }}
runs-on:
group: infra1-runners-arc
labels: runners-small
Expand All @@ -117,16 +165,16 @@ jobs:
const url = `https://github.com/${repository.owner}/${repository.repo}/actions/runs/${context.runId}`;
let testResult = "'command not recognized'";
if (process.env.COMMENT === 'extended test - isolated') {
if (process.env.COMMENT?.startsWith('extended-test --isolated')) {
testResult = process.env.TEST_RESULT_ISOLATED;
}
if (process.env.COMMENT === 'extended test - record') {
if (process.env.COMMENT?.startsWith('extended-test --record')) {
testResult = process.env.TEST_RESULT_RECORD;
}
if (process.env.COMMENT === 'extended test - integrated') {
if (process.env.COMMENT?.startsWith('extended-test --integrated')) {
testResult = process.env.TEST_RESULT_INTEGRATED;
}
if (process.env.COMMENT === 'extended test - backstop') {
if (process.env.COMMENT?.startsWith('extended-test --backstop')) {
testResult = process.env.TEST_RESULT_BACKSTOP;
}
Expand Down
35 changes: 34 additions & 1 deletion .github/workflows/push-e2e-integrated-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,44 @@ on:
- release

jobs:
pull-request-info:
if: ${{ !(startsWith(github.event.head_commit.message, format('chore{0} bump versions to', ':')) || startsWith(github.event.head_commit.message, format('chore{0} update Hugo version to', ':'))) }}
runs-on: [ubuntu-latest]
outputs:
author: ${{ steps.author.outputs.result }}
steps:
- uses: actions/github-script@v7
id: author
with:
script: |
const pullRequests = await github.rest.repos.listPullRequestsAssociatedWithCommit({
commit_sha: context.sha,
owner: context.repo.owner,
repo: context.repo.repo,
});
return pullRequests?.data[0]?.user?.login;
result-encoding: string

e2e-integrated:
if: ${{ !(startsWith(github.event.head_commit.message, 'Release ') || startsWith(github.event.head_commit.message, format('chore{0} bump versions to', ':'))) }}
needs: [pull-request-info]
permissions:
id-token: write
contents: read
pull-requests: read
uses: ./.github/workflows/rw-rush-build-e2e-tests-integrated.yml
secrets: inherit

notify-failed-to-slack:
if: ${{ !cancelled() && needs.e2e-integrated.result == 'failure' }}
needs: [e2e-integrated,pull-request-info]
runs-on: [ubuntu-latest]
steps:
- name: Inform to slack when workflows failed
uses: slackapi/[email protected]
with:
channel-id: "#javascript-notifications"
slack-message: ":warning: post merge e2e in *gooddata-sdk-ui* initiated by ${{env.AUTHOR}} encountered an error during execution. Check the *<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|log here>* for further information."
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
AUTHOR: ${{ needs.pull-request-info.outputs.author }}
3 changes: 2 additions & 1 deletion .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"order/properties-order": null,
"max-nesting-depth": 4,
"value-keyword-case": ["lower", { "ignoreProperties": ["--gd-font-family"] }],
"color-hex-length": null
"color-hex-length": null,
"declaration-empty-line-before": null
}
}
101 changes: 100 additions & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The following 3rd-party software packages may be used by or distributed with goo

Date generated: 2024-12-12

Revision ID: 122ea873a7d2a0677994b41a1dd27ad5eee0f954
Revision ID: 7858990a3c705864b91bd44591aa99013da8e51b

================================================================================
================================================================================
Expand Down Expand Up @@ -206,6 +206,8 @@ Revision ID: 122ea873a7d2a0677994b41a1dd27ad5eee0f954
- @seznam/compose-react-refs (1.0.6) [ISC]
- @sidvind/better-ajv-errors (2.1.3) [Apache-2.0]
- @sinclair/typebox (0.27.8) [MIT]
- @tanstack/react-virtual (3.11.1) [MIT]
- @tanstack/virtual-core (3.10.9) [MIT]
- @tootallnate/once (2.0.0) [MIT]
- @ts-morph/common (0.12.3) [Apache-2.0, MIT]
- @types/body-parser (1.19.5) [MIT]
Expand Down Expand Up @@ -7897,6 +7899,78 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


--------------------------------------------------------------------------------
Package Title: @tanstack/react-virtual (3.11.1)

Package Locator: npm+@tanstack/react-virtual$3.11.1

Package Depth: Direct
--------------------------------------------------------------------------------

* Declared Licenses *
MIT


MIT License

Copyright (c) 2021-present Tanner Linsley

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



--------------------------------------------------------------------------------
Package Title: @tanstack/virtual-core (3.10.9)

Package Locator: npm+@tanstack/virtual-core$3.10.9

Package Depth: Transitive
--------------------------------------------------------------------------------

* Declared Licenses *
MIT


MIT License

Copyright (c) 2021-present Tanner Linsley

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



--------------------------------------------------------------------------------
Package Title: @tootallnate/once (2.0.0)

Expand Down Expand Up @@ -67710,6 +67784,31 @@ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


* MIT *

MIT License

Copyright (c) 2021-present Tanner Linsley

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


* MIT *

MIT License
Expand Down
Loading

0 comments on commit c9371c0

Please sign in to comment.