Skip to content

Commit cca24e0

Browse files
committed
MPT-15317 Report portal setup
1 parent 5ffcc88 commit cca24e0

File tree

4 files changed

+63
-10
lines changed

4 files changed

+63
-10
lines changed

.github/workflows/cron-main-e2e.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
jobs:
77
build:
88
runs-on: ubuntu-latest
9-
timeout-minutes: 20
9+
timeout-minutes: 45
1010
steps:
1111
- name: "Checkout"
1212
uses: actions/checkout@v4
@@ -30,7 +30,7 @@ jobs:
3030
- name: "Run E2E test"
3131
run: docker compose run --service-ports e2e bash -c "pytest -v -p no:randomly --no-cov --reportportal --rp-launch=$RP_LAUNCH --rp-api-key=$RP_API_KEY --rp-endpoint=$RP_ENDPOINT --junitxml=e2e-report.xml tests/e2e"
3232
env:
33-
RP_LAUNCH: github-e2e-cron-main
33+
RP_LAUNCH: github-e2e-cron-${{ github.ref_name }}
3434
RP_ENDPOINT: ${{ secrets.RP_ENDPOINT }}
3535
RP_API_KEY: ${{ secrets.RP_API_KEY }}
3636

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ name: PR build and merge
33
on:
44
pull_request:
55
types: [opened, synchronize, reopened]
6-
push:
7-
branches:
8-
- main
9-
- "release/**"
106

117
permissions:
128
contents: read
@@ -15,7 +11,7 @@ jobs:
1511
build:
1612

1713
runs-on: ubuntu-latest
18-
timeout-minutes: 20
14+
timeout-minutes: 45
1915

2016
steps:
2117
- name: "Checkout"
@@ -41,9 +37,9 @@ jobs:
4137
run: docker compose run --service-ports app_test
4238

4339
- name: "Run E2E test"
44-
run: docker compose run --service-ports e2e bash -c "pytest -v -p no:randomly --no-cov --junitxml=e2e-report.xml tests/e2e"
40+
run: docker compose run --service-ports e2e bash -c "pytest -v -p no:randomly --no-cov --reportportal --rp-launch=$RP_LAUNCH --rp-api-key=$RP_API_KEY --rp-endpoint=$RP_ENDPOINT --junitxml=e2e-report.xml tests/e2e"
4541
env:
46-
RP_LAUNCH: github-e2e-test
42+
RP_LAUNCH: github-e2e-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_number }}
4743
RP_ENDPOINT: ${{ secrets.RP_ENDPOINT }}
4844
RP_API_KEY: ${{ secrets.RP_API_KEY }}
4945

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: PR build and merge
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- "release/**"
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 45
17+
18+
steps:
19+
- name: "Checkout"
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: "Build test containers"
25+
run: docker compose build app_test e2e
26+
27+
- name: "Create environment file"
28+
run: env | grep -E '^MPT_' > .env
29+
env:
30+
RP_ENDPOINT: ${{ secrets.RP_ENDPOINT }}
31+
RP_API_KEY: ${{ secrets.RP_API_KEY }}
32+
MPT_API_BASE_URL: ${{ secrets.MPT_API_BASE_URL }}
33+
MPT_API_TOKEN: ${{ secrets.MPT_API_TOKEN }}
34+
MPT_API_TOKEN_CLIENT: ${{ secrets.MPT_API_TOKEN_CLIENT }}
35+
MPT_API_TOKEN_OPERATIONS: ${{ secrets.MPT_API_TOKEN_OPERATIONS }}
36+
MPT_API_TOKEN_VENDOR: ${{ secrets.MPT_API_TOKEN_VENDOR }}
37+
38+
- name: "Run validation & test"
39+
run: docker compose run --service-ports app_test
40+
41+
- name: "Run E2E test"
42+
run: docker compose run --service-ports e2e bash -c "pytest -v -p no:randomly --no-cov --reportportal --rp-launch=$RP_LAUNCH --rp-api-key=$RP_API_KEY --rp-endpoint=$RP_ENDPOINT --junitxml=e2e-report.xml tests/e2e"
43+
env:
44+
RP_LAUNCH: github-e2e-${{ github.event_name }}-${{ github.event.pull_request.number || github.run_number }}
45+
RP_ENDPOINT: ${{ secrets.RP_ENDPOINT }}
46+
RP_API_KEY: ${{ secrets.RP_API_KEY }}
47+
48+
49+
- name: "Run SonarCloud Scan"
50+
uses: SonarSource/sonarqube-scan-action@master
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
54+
55+
- name: "Stop containers"
56+
if: always()
57+
run: docker compose down

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
build:
1313

1414
runs-on: ubuntu-latest
15-
timeout-minutes: 20
15+
timeout-minutes: 45
1616

1717
steps:
1818
- name: "Checkout"

0 commit comments

Comments
 (0)