Persist sorting in Browse models #40482
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Triggers Percy job by "@metabase-bot run visual tests" comment in a PR | |
name: PercyIssueComment | |
on: | |
issue_comment: | |
types: [created] | |
jobs: | |
pr_info: | |
if: github.event.comment.body == '@metabase-bot run visual tests' | |
runs-on: ubuntu-22.04 | |
outputs: | |
pull_request_number: ${{ fromJson(steps.fetch_pr.outputs.data).head.number }} | |
branch_name: ${{ fromJson(steps.fetch_pr.outputs.data).head.ref }} | |
commit_sha: ${{ fromJson(steps.fetch_pr.outputs.data).head.sha }} | |
steps: | |
- uses: tibdex/github-app-token@v2.1.0 | |
id: generate-token | |
with: | |
app_id: ${{ secrets.METABASE_BOT_APP_ID }} | |
private_key: ${{ secrets.METABASE_BOT_APP_PRIVATE_KEY }} | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ needs.pr_info.outputs.branch_name }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Verify Membership | |
id: verify-membership | |
uses: ./.github/actions/verify-membership | |
with: | |
github_token: ${{ steps.generate-token.outputs.token }} | |
organization_name: metabase | |
username: ${{ github.event.comment.user.login }} | |
- run: | | |
result=${{ steps.verify-membership.outputs.is_member }} | |
if [ $result == false ]; then | |
echo User ${{ github.event.comment.user.login }} is not a member of Metabase organization | |
exit 1 | |
fi | |
- name: Fetch issue | |
uses: octokit/request-action@v2.x | |
id: fetch_issue | |
with: | |
route: GET ${{ github.event.issue.url }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Fetch PR | |
uses: octokit/request-action@v2.x | |
id: fetch_pr | |
with: | |
route: GET ${{ fromJson(steps.fetch_issue.outputs.data).pull_request.url }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
percy: | |
timeout-minutes: 30 | |
runs-on: buildjet-4vcpu-ubuntu-2004 | |
needs: [pr_info] | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
MB_EDITION: ee | |
CYPRESS_ALL_FEATURES_TOKEN: ${{ secrets.ENTERPRISE_TOKEN }} | |
CYPRESS_NO_FEATURES_TOKEN: ${{ secrets.E2E_STARTER_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ needs.pr_info.outputs.branch_name }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Prepare front-end environment | |
uses: ./.github/actions/prepare-frontend | |
- name: Prepare back-end environment | |
uses: ./.github/actions/prepare-backend | |
with: | |
m2-cache-key: percy-issue-comment | |
- name: Prepare cypress environment | |
uses: ./.github/actions/prepare-cypress | |
- run: ./bin/build.sh | |
- name: Get the version info | |
run: | | |
jar xf target/uberjar/metabase.jar version.properties | |
mv version.properties resources/ | |
- name: Run maildev | |
run: docker run -d -p 1080:1080 -p 1025:1025 maildev/maildev:2.0.5 | |
- name: Percy Test | |
run: yarn run test-visual-run | |
env: | |
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} | |
PERCY_COMMIT: ${{ needs.pr_info.outputs.commit_sha }} | |
PERCY_BRANCH: ${{ needs.pr_info.outputs.branch_name }} | |
PERCY_PULL_REQUEST: ${{ needs.pr_info.outputs.pull_request_number }} |