From 82bc40e9591083233b78a3c224b8cd21e5b93246 Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Tue, 10 Sep 2024 09:10:15 +0800 Subject: [PATCH 1/5] add an assertion in anActiveUserExists to ensure the test user is active --- application/features/bootstrap/IdpIdBrokerIntegrationContext.php | 1 + 1 file changed, 1 insertion(+) diff --git a/application/features/bootstrap/IdpIdBrokerIntegrationContext.php b/application/features/bootstrap/IdpIdBrokerIntegrationContext.php index 4004f3f..8682468 100644 --- a/application/features/bootstrap/IdpIdBrokerIntegrationContext.php +++ b/application/features/bootstrap/IdpIdBrokerIntegrationContext.php @@ -65,6 +65,7 @@ protected function generateDummyPassword() public function anActiveUserExists() { $newUser = $this->idBroker->createUser($this->testUserData); + Assert::assertTrue($newUser->getActive() === 'yes'); Assert::assertNotNull($newUser); } From baaeef700dac5d918e234408c621877d4258a8bf Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Wed, 30 Oct 2024 14:38:00 +0800 Subject: [PATCH 2/5] push a major-version tag --- .github/CODEOWNERS | 2 ++ .github/workflows/test-and-publish.yml | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..025d8b5 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +* @silinternational/developers +*.php @silinternational/php-devs diff --git a/.github/workflows/test-and-publish.yml b/.github/workflows/test-and-publish.yml index ede07cf..e65d95f 100644 --- a/.github/workflows/test-and-publish.yml +++ b/.github/workflows/test-and-publish.yml @@ -19,6 +19,7 @@ jobs: name: Build and Publish needs: tests runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags') steps: - name: Checkout code uses: actions/checkout@v4 @@ -47,6 +48,7 @@ jobs: type=ref,event=branch type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} - name: Build and push Docker image to Docker Hub uses: docker/build-push-action@v5 @@ -67,4 +69,4 @@ jobs: ghcr.io/${{ github.repository }}:${{ github.ref_name }} labels: ${{ steps.meta.outputs.labels }} build-args: | - GITHUB_REF_NAME=${{ github.ref_name }} \ No newline at end of file + GITHUB_REF_NAME=${{ github.ref_name }} From 83f7af2f4405ad3be5f4cf0bc9892531ed622024 Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Wed, 30 Oct 2024 14:41:28 +0800 Subject: [PATCH 3/5] update PR checklist for change to main-only branch strategy --- .github/pull_request_template.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 01b12dc..52345ce 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -18,7 +18,8 @@ --- -### Feature PR Checklist +### PR Checklist +- [ ] Put version number in PR title (e.g. `Release x.y.z - Summary of changes`) - [ ] Documentation (README, etc.) - [ ] Unit tests created or updated - [ ] Run `make composershow` From 7d3f154ce671b5c03879caad7a98d38a510149dd Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Wed, 30 Oct 2024 17:47:50 +0800 Subject: [PATCH 4/5] remove Codeship reference in a comment --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bdc3638..e111010 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ psr2: docker compose run --rm cli bash -c "vendor/bin/php-cs-fixer fix ." # NOTE: When running tests locally, make sure you don't exclude the integration -# tests (which we do when testing on Codeship). +# tests (which we do when testing on CI). test: deps unittest broker behat testci: deps broker From 63bcfb109f59d77b4d8b06246428977d156223f0 Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Wed, 30 Oct 2024 17:49:21 +0800 Subject: [PATCH 5/5] remove Codeship reference in a test token --- actions-services.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actions-services.yml b/actions-services.yml index fff0a6b..7c85ad7 100644 --- a/actions-services.yml +++ b/actions-services.yml @@ -12,7 +12,7 @@ services: EMAIL_SERVICE_baseUrl: http://email EMAIL_SERVICE_validIpRanges: 192.168.0.0/16 ID_BROKER_ADAPTER: fake - ID_BROKER_CONFIG_accessToken: codeship-sync-to-broker-11111111 + ID_BROKER_CONFIG_accessToken: ci-sync-to-broker-11111111 ID_STORE_ADAPTER: fake IDP_NAME: Test @@ -20,7 +20,7 @@ services: image: silintl/idp-id-broker:latest environment: APP_ENV: test - API_ACCESS_KEYS: codeship-sync-to-broker-11111111 + API_ACCESS_KEYS: ci-sync-to-broker-11111111 EMAIL_SERVICE_accessToken: dummy EMAIL_SERVICE_assertValidIp: "false" EMAIL_SERVICE_baseUrl: http://email