Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
merge_group:

concurrency:
group: ci-coverage-global-${{ github.ref }}
group: ci-coverage-e2e-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-e2e-template.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run global Trustify CI tests
name: Run e2e Trustify CI tests

on:
workflow_call:
Expand Down
40 changes: 37 additions & 3 deletions .github/workflows/ci-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@ on:
push:
branches:
- "main"
- "release/*"
pull_request:
branches:
- "main"
- "release/*"
workflow_call:
merge_group:

concurrency:
group: ci-global-${{ github.ref }}
group: ci-e2e-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-upload-for-global-ci:
build-and-upload-for-e2e-ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
Expand All @@ -32,9 +34,41 @@ jobs:
path: /tmp/trustify-ui.tar
retention-days: 1

discover-envs-for-e2e-ci:
runs-on: ubuntu-latest
outputs:
image_tag: ${{ steps.set-outputs.outputs.image_tag }}
steps:
- name: Extract env vars for main
shell: bash
if: ${{ (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main') || (github.event_name != 'pull_request' && github.ref == 'refs/heads/main') }}
run: |
echo "image_tag=latest" >> $GITHUB_ENV
- name: Extract env vars for other branches on PR
shell: bash
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref != 'main' }}
run: |
branch=${{ github.event.pull_request.base.ref }}
branch_version="${branch#release/}"
echo "image_tag=$branch_version" >> $GITHUB_ENV
- name: Extract env vars for other branches on Push
shell: bash
if: ${{ github.event_name != 'pull_request' && contains(github.ref, 'refs/heads/main') == false }}
run: |
branch=$(echo ${GITHUB_REF#refs/heads/})
branch_version="${branch#release/}"
echo "image_tag=$branch_version" >> $GITHUB_ENV
- name: Set outputs
id: set-outputs
run: |
echo "image_tag=${{ env.image_tag }}" >> "$GITHUB_OUTPUT"

run-e2e-ci:
needs: build-and-upload-for-global-ci
needs:
- build-and-upload-for-e2e-ci
- discover-envs-for-e2e-ci
uses: ./.github/workflows/ci-e2e-template.yaml
with:
artifact: trustify-ui
ui_image: ghcr.io/trustification/trustify-ui:pr-test
server_image: ghcr.io/trustification/trustd:${{ needs.discover-envs-for-e2e-ci.outputs.image_tag }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Nightly CI (global trustify CI @main)
name: Nightly CI (e2e trustify CI @main)

on:
schedule:
Expand All @@ -8,4 +8,4 @@ on:

jobs:
nightly:
uses: ./.github/workflows/ci-global.yaml
uses: ./.github/workflows/ci-e2e.yaml
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Trustify UI Component

| branch | last merge e2e CI | nightly e2e CI |
| :----- | :---------------- | :------------- |
| main | [![CI (global Trustify CI)](https://github.com/trustification/trustify-ui/actions/workflows/ci-global.yaml/badge.svg?branch=main&event=push)](https://github.com/trustification/trustify-ui/actions/workflows/ci-global.yaml?query=branch%3Amain+event%3Apush) | [![Nightly CI (global trustify CI @main)](https://github.com/trustification/trustify-ui/actions/workflows/nightly-ci-global.yaml/badge.svg?branch=main&event=schedule)](https://github.com/trustification/trustify-ui/actions/workflows/nightly-ci-global.yaml?query=branch%3Amain+event%3Aschedule) |
| main | [![CI (e2e Trustify CI)](https://github.com/trustification/trustify-ui/actions/workflows/ci-e2e.yaml/badge.svg?branch=main&event=push)](https://github.com/trustification/trustify-ui/actions/workflows/ci-e2e.yaml?query=branch%3Amain+event%3Apush) | [![Nightly CI (e2e trustify CI @main)](https://github.com/trustification/trustify-ui/actions/workflows/nightly-ci-e2e.yaml/badge.svg?branch=main&event=schedule)](https://github.com/trustification/trustify-ui/actions/workflows/nightly-ci-e2e.yaml?query=branch%3Amain+event%3Aschedule) |

## Development

Expand Down