-
-
Notifications
You must be signed in to change notification settings - Fork 229
ci: migrate to OIDC trusted publishing and align workflows with module template #421
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
Changes from all commits
5df2cb4
1917a08
6bff668
c9088b7
688198a
1bce479
2463920
8b88ff0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "problemMatcher": [ | ||
| { | ||
| "owner": "actionlint", | ||
| "pattern": [ | ||
| { | ||
| "regexp": "^(?:\\x1b\\[\\d+m)?(.+?)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*: (?:\\x1b\\[\\d+m)*(.+?)(?:\\x1b\\[\\d+m)* \\[(.+?)\\]$", | ||
| "file": 1, | ||
| "line": 2, | ||
| "column": 3, | ||
| "message": 4, | ||
| "code": 5 | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # Please see the documentation for all configuration options: | ||
| # https://github.com/rhysd/actionlint/blob/main/docs/config.md#configuration-file | ||
|
|
||
| paths: | ||
| .github/workflows/create-release-pr.yml: | ||
| ignore: | ||
| # `create-release-pr` has an empty string value for the `release-type` | ||
| # input, which is intentional and valid. | ||
| - 'string should not be empty' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,125 @@ | ||
| name: Build, Lint, and Test | ||
|
|
||
| on: | ||
| workflow_call: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| prepare: | ||
| name: Prepare | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| node-version: [22.x, 24.x, 26.x] | ||
| steps: | ||
| - name: Checkout and setup environment | ||
| uses: MetaMask/action-checkout-and-setup@v3 | ||
| with: | ||
| is-high-risk-environment: false | ||
| persist-credentials: false | ||
| node-version: ${{ matrix.node-version }} | ||
| cache-node-modules: ${{ matrix.node-version == '26.x' }} | ||
|
|
||
| build: | ||
| name: Build | ||
| needs: prepare | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| node-version: [26.x] | ||
| steps: | ||
| - name: Checkout and setup environment | ||
| uses: MetaMask/action-checkout-and-setup@v3 | ||
| with: | ||
| is-high-risk-environment: false | ||
| persist-credentials: false | ||
| node-version: ${{ matrix.node-version }} | ||
| - run: yarn build | ||
| - name: Require clean working directory | ||
| shell: bash | ||
| run: | | ||
| if ! git diff --exit-code; then | ||
| echo "Working tree dirty at end of job" | ||
| exit 1 | ||
| fi | ||
|
|
||
| lint: | ||
| name: Lint | ||
| needs: prepare | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| node-version: [26.x] | ||
| steps: | ||
| - name: Checkout and setup environment | ||
| uses: MetaMask/action-checkout-and-setup@v3 | ||
| with: | ||
| is-high-risk-environment: false | ||
| persist-credentials: false | ||
| node-version: ${{ matrix.node-version }} | ||
| - run: yarn lint | ||
| - name: Validate RC changelog | ||
| if: ${{ startsWith(github.head_ref, 'release/') }} | ||
| run: yarn auto-changelog validate --rc | ||
| - name: Validate changelog | ||
| if: ${{ !startsWith(github.head_ref, 'release/') }} | ||
| run: yarn auto-changelog validate | ||
| - name: Require clean working directory | ||
| shell: bash | ||
| run: | | ||
| if ! git diff --exit-code; then | ||
| echo "Working tree dirty at end of job" | ||
| exit 1 | ||
| fi | ||
|
|
||
| test: | ||
| name: Test | ||
| needs: prepare | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| node-version: [22.x, 24.x, 26.x] | ||
| steps: | ||
| - name: Checkout and setup environment | ||
| uses: MetaMask/action-checkout-and-setup@v3 | ||
| with: | ||
| is-high-risk-environment: false | ||
| persist-credentials: false | ||
| node-version: ${{ matrix.node-version }} | ||
| - run: yarn test | ||
| - name: Require clean working directory | ||
| shell: bash | ||
| run: | | ||
| if ! git diff --exit-code; then | ||
| echo "Working tree dirty at end of job" | ||
| exit 1 | ||
| fi | ||
|
|
||
| compatibility-test: | ||
| name: Compatibility test | ||
| needs: prepare | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| node-version: [22.x, 24.x, 26.x] | ||
| steps: | ||
| - name: Checkout and setup environment | ||
| uses: MetaMask/action-checkout-and-setup@v3 | ||
| with: | ||
| is-high-risk-environment: false | ||
| persist-credentials: false | ||
| node-version: ${{ matrix.node-version }} | ||
| - name: Install dependencies via Yarn | ||
| run: rm yarn.lock && YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn | ||
| - run: yarn test | ||
| - name: Restore lockfile | ||
| run: git restore yarn.lock | ||
| - name: Require clean working directory | ||
| shell: bash | ||
| run: | | ||
| if ! git diff --exit-code; then | ||
| echo "Working tree dirty at end of job" | ||
| exit 1 | ||
| fi | ||
This file was deleted.
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like there have been other changes to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The module template adds a
compatibility-testjob tobuild-lint-test.ymlwhich ensures that minor and patch bumps to dependencies don't accidentally cause breaking changes (ensuring that if the package is installed in another project it doesn't have issues). Does it make sense to add this while we are at it?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mcmire , added this