Skip to content

Commit

Permalink
Adds merge_group trigger to workflows. (#1431)
Browse files Browse the repository at this point in the history
* Adds merge_group trigger to workflows.

* ensure integration test works on merge_group trigger

---------

Co-authored-by: Kian Parvin <[email protected]>
  • Loading branch information
alesstimec and kian99 authored Nov 13, 2024
1 parent 064976f commit 65634b4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/check-signed-commits.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Check signed commits
on: pull_request_target
on:
pull_request_target:

jobs:
check-signed-commits:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
pull_request:
workflow_call:
workflow_dispatch:
merge_group:

jobs:
build_test:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: golangci-lint
on:
pull_request:
merge_group:

permissions:
contents: read
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/integration-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
View all available versions at https://github.com/canonical/jimm/pkgs/container/jimm.
required: true
pull_request:
merge_group:

jobs:
startjimm:
Expand All @@ -19,17 +20,17 @@ jobs:
uses: actions/checkout@v4

- name: Setup Go
if: ${{ github.event_name == 'pull_request' }}
if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'

- name: Go vendor to speed up docker build
if: ${{ github.event_name == 'pull_request' }}
if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}
run: go mod vendor

- name: Start JIMM (pull request)
if: ${{ github.event_name == 'pull_request' }}
if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}
uses: ./.github/actions/test-server
with:
jimm-version: dev
Expand Down
4 changes: 2 additions & 2 deletions internal/jimmhttp/rebac_admin/identities_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ func (s *identitiesSuite) TestGetIdentityGroupsWithDeletedDbGroup(c *gc.C) {
Relation: ofganames.MemberRelation,
}
group1Access := baseTuple
group1Access.Target = ofganames.ConvertTag(group1)
group1Access.Target = ofganames.ConvertTag(group1.ResourceTag())
group2Access := baseTuple
group2Access.Target = ofganames.ConvertTag(group2)
group2Access.Target = ofganames.ConvertTag(group2.ResourceTag())

err := s.JIMM.OpenFGAClient.AddRelation(ctx, group1Access, group2Access)
c.Assert(err, gc.IsNil)
Expand Down

0 comments on commit 65634b4

Please sign in to comment.