Skip to content

Commit 47c1900

Browse files
committed
CI Fixes
various ci fixes since we moved to stratpaac Signed-off-by: Chmouel Boudjnah <chmouel@redhat.com>
1 parent 3bf38a3 commit 47c1900

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

.github/workflows/e2e.yaml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
if: >
2424
github.event_name == 'schedule' ||
2525
(github.event_name == 'workflow_dispatch') ||
26-
(github.event_name == 'pull_request_target' && (github.event.label.name == 'e2e' || contains(github.event.pull_request.labels.*.name, 'e2e')))
26+
(startsWith(github.event_name, 'pull_request') && contains(github.event.pull_request.labels.*.name, 'e2e'))
2727
2828
concurrency:
2929
group: ${{ github.workflow }}-${{ matrix.provider }}-${{ github.event.pull_request.number || github.ref }}
@@ -77,17 +77,20 @@ jobs:
7777
repo: chmouel/gosmee
7878

7979
- name: Run gosmee main controller
80+
run: |
81+
nohup gosmee client --saveDir /tmp/gosmee-replay ${{ secrets.PYSMEE_URL }} "${TEST_EL_URL}" &
82+
83+
- name: Run gosmee gitea
8084
run: |
8185
nohup gosmee client --saveDir /tmp/gosmee-replay ${{ secrets.TEST_GITEA_SMEEURL }} "${TEST_EL_URL}" &
8286
8387
- name: Run gosmee second controller
84-
if: matrix.provider == 'providers'
8588
run: |
8689
nohup gosmee client --saveDir /tmp/gosmee-replay ${{ secrets.TEST_GITHUB_SECOND_SMEE_URL }} "${TEST_GITHUB_SECOND_EL_URL}" &
8790
8891
- name: Setup tmate session
8992
uses: mxschmitt/action-tmate@v3
90-
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
93+
# if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
9194
env:
9295
PAC_GITHUB_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
9396
PAC_GITHUB_APPLICATION_ID: ${{ vars.APPLICATION_ID }}
@@ -108,6 +111,7 @@ jobs:
108111
TEST_BITBUCKET_SERVER_TOKEN: ${{ secrets.BITBUCKET_SERVER_TOKEN }}
109112
TEST_BITBUCKET_SERVER_API_URL: ${{ secrets.BITBUCKET_SERVER_API_URL }}
110113
TEST_BITBUCKET_SERVER_WEBHOOK_SECRET: ${{ secrets.BITBUCKET_SERVER_WEBHOOK_SECRET }}
114+
PREVIOUS_SHA: ${{ github.event.before }}
111115
with:
112116
detached: true
113117
limit-access-to-actor: true
@@ -129,6 +133,14 @@ jobs:
129133
- name: Run E2E Tests
130134
if: ${{ github.event_name != 'schedule' || github.event.label.name == 'e2e' || contains(github.event.pull_request.labels.*.name, 'e2e') }}
131135
env:
136+
PAC_GITHUB_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
137+
PAC_GITHUB_APPLICATION_ID: ${{ vars.APPLICATION_ID }}
138+
PAC_WEBHOOK_SECRET: ${{ secrets.WEBHOOK_SECRET }}
139+
PAC_SMEE_URL: ${{ secrets.PYSMEE_URL }}
140+
TEST_GITHUB_SECOND_SMEE_URL: ${{ secrets.TEST_GITHUB_SECOND_SMEE_URL }}
141+
TEST_GITHUB_SECOND_PRIVATE_KEY: ${{ secrets.TEST_GITHUB_SECOND_PRIVATE_KEY }}
142+
TEST_GITHUB_SECOND_WEBHOOK_SECRET: ${{ secrets.TEST_GITHUB_SECOND_WEBHOOK_SECRET }}
143+
TEST_GITHUB_SECOND_APPLICATION_ID: ${{ vars.TEST_GITHUB_SECOND_APPLICATION_ID }}
132144
TEST_PROVIDER: ${{ matrix.provider }}
133145
TEST_BITBUCKET_CLOUD_TOKEN: ${{ secrets.BITBUCKET_CLOUD_TOKEN }}
134146
TEST_EL_WEBHOOK_SECRET: ${{ secrets.WEBHOOK_SECRET }}
@@ -140,6 +152,7 @@ jobs:
140152
TEST_BITBUCKET_SERVER_TOKEN: ${{ secrets.BITBUCKET_SERVER_TOKEN }}
141153
TEST_BITBUCKET_SERVER_API_URL: ${{ secrets.BITBUCKET_SERVER_API_URL }}
142154
TEST_BITBUCKET_SERVER_WEBHOOK_SECRET: ${{ secrets.BITBUCKET_SERVER_WEBHOOK_SECRET }}
155+
PREVIOUS_SHA: ${{ github.event.before }}
143156
run: |
144157
./hack/gh-workflow-ci.sh run_e2e_tests
145158

hack/gh-workflow-ci.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
# shellcheck disable=SC2038,SC2153
33
# Helper script for GitHub Actions CI, used from e2e tests.
4-
set -exufo pipefail
4+
set -eufo pipefail
55

66
get_tests() {
77
target=$1
@@ -58,7 +58,8 @@ EOF
5858
(
5959
cd ${HOME}/startpaac
6060
if [[ ${TEST_PROVIDER} == "providers" ]]; then
61-
./startpaac --all-github-second-no-forgejo
61+
./startpaac --all
62+
./startpaac --github-second-ctrl
6263
else
6364
./startpaac --all
6465
fi

0 commit comments

Comments
 (0)