Skip to content

Commit f760ae1

Browse files
jvbrionesMrtenz
andauthored
ci: Migrates some GH workflows to reusable actions (#23178)
Migrates some GH workflows to reusable actions. follow-up PR of these: - MetaMask/github-tools#169 - MetaMask/github-tools#168 <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Migrates CI workflows from reusable workflows to explicit action steps and adds manual dispatch triggers where applicable. > > - **Workflows**: > - **`check-pr-max-lines.yml`**: > - Replace reusable workflow with action `MetaMask/github-tools/.github/actions/pr-line-check@v1`. > - Add `runs-on: ubuntu-latest`; configure `max-lines` and `ignore-patterns`. > - **`flaky-test-report.yml`**: > - Replace reusable workflow with action `.../flaky-test-report@v1`. > - Add `workflow_dispatch`; set `runs-on`; pass `repository`, `workflow-id`, `github-token`, and Slack webhook. > - **`post-merge-validation.yml`**: > - Replace reusable workflow with action `.../post-merge-validation@v1`. > - Add `workflow_dispatch`; set `runs-on`; pass `repo`, `start-hour-utc`, `github-token`, and GCP creds. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit dc5e870. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Maarten Zuidhoorn <[email protected]>
1 parent 35345f4 commit f760ae1

File tree

3 files changed

+30
-21
lines changed

3 files changed

+30
-21
lines changed
Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1-
name: "Check PR Max Lines"
1+
name: 'Check PR Max Lines'
22

33
on:
44
pull_request:
55
types: [opened, reopened, synchronize]
66

77
permissions:
88
contents: read
9-
pull-requests: write # Required for the called workflow to manage labels
9+
pull-requests: write # Required for the called workflow to manage labels
1010

1111
jobs:
1212
check-pr-max-lines:
13-
uses: metamask/github-tools/.github/workflows/pr-line-check.yml@main
14-
with:
15-
max_lines: 1000
16-
ignore_patterns: '(\.lock|\.snap)$'
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check PR lines changed
16+
uses: MetaMask/github-tools/.github/actions/pr-line-check@v1
17+
with:
18+
max-lines: '1000'
19+
ignore-patterns: '(\.lock|\.snap)$'

.github/workflows/flaky-test-report.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,20 @@ on:
44
schedule:
55
# Once every day from Monday-Friday at 08:00 UTC
66
- cron: 0 8 * * 1-5
7+
workflow_dispatch:
78

89
permissions:
910
contents: read
1011
actions: read
1112

1213
jobs:
1314
flaky-test-report:
14-
uses: MetaMask/github-tools/.github/workflows/flaky-test-report.yml@main
15-
with:
16-
repository: ${{ github.event.repository.name }}
17-
workflow_id: ci.yml
18-
secrets:
19-
github-token: ${{ secrets.GITHUB_TOKEN }}
20-
slack-webhook-flaky-tests: ${{ secrets.SLACK_WEBHOOK_FLAKY_TESTS }}
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Generate flaky test report
18+
uses: MetaMask/github-tools/.github/actions/flaky-test-report@v1
19+
with:
20+
repository: ${{ github.event.repository.name }}
21+
workflow-id: ci.yml
22+
github-token: ${{ secrets.GITHUB_TOKEN }}
23+
slack-webhook-flaky-tests: ${{ secrets.SLACK_WEBHOOK_FLAKY_TESTS }}
Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
name: Post Merge Validation
22

3-
on:
3+
on:
44
schedule:
55
- cron: '0 7 * * *'
6+
workflow_dispatch:
67

78
jobs:
89
post-merge-validation-tracker:
9-
uses: MetaMask/github-tools/.github/workflows/post-merge-validation.yml@main
10-
with:
11-
repo: ${{ github.repository }}
12-
start_hour_utc: 7
13-
secrets:
14-
github-token: ${{ secrets.GITHUB_TOKEN }}
15-
google-application-creds-base64: ${{ secrets.GCP_RLS_SHEET_ACCOUNT_BASE64 }}
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Run post-merge validation
13+
uses: MetaMask/github-tools/.github/actions/post-merge-validation@v1
14+
with:
15+
repo: ${{ github.repository }}
16+
start-hour-utc: '7'
17+
github-token: ${{ secrets.GITHUB_TOKEN }}
18+
google-application-creds-base64: ${{ secrets.GCP_RLS_SHEET_ACCOUNT_BASE64 }}

0 commit comments

Comments
 (0)