Skip to content

Commit e7d975b

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

File tree

4 files changed

+61
-8
lines changed

4 files changed

+61
-8
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

.github/workflows/pull-request.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: PR build and merge
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 45
15+
16+
steps:
17+
- name: "Checkout"
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: "Build test containers"
23+
run: docker compose build app_test e2e
24+
25+
- name: "Create environment file"
26+
run: env | grep -E '^MPT_' > .env
27+
env:
28+
RP_ENDPOINT: ${{ secrets.RP_ENDPOINT }}
29+
RP_API_KEY: ${{ secrets.RP_API_KEY }}
30+
MPT_API_BASE_URL: ${{ secrets.MPT_API_BASE_URL }}
31+
MPT_API_TOKEN: ${{ secrets.MPT_API_TOKEN }}
32+
MPT_API_TOKEN_CLIENT: ${{ secrets.MPT_API_TOKEN_CLIENT }}
33+
MPT_API_TOKEN_OPERATIONS: ${{ secrets.MPT_API_TOKEN_OPERATIONS }}
34+
MPT_API_TOKEN_VENDOR: ${{ secrets.MPT_API_TOKEN_VENDOR }}
35+
36+
- name: "Run validation & test"
37+
run: docker compose run --service-ports app_test
38+
39+
- name: "Run E2E test"
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"
41+
env:
42+
RP_LAUNCH: github-e2e-pull_request-${{ github.event.number }}
43+
RP_ENDPOINT: ${{ secrets.RP_ENDPOINT }}
44+
RP_API_KEY: ${{ secrets.RP_API_KEY }}
45+
46+
47+
- name: "Run SonarCloud Scan"
48+
uses: SonarSource/sonarqube-scan-action@master
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
52+
53+
- name: "Stop containers"
54+
if: always()
55+
run: docker compose down
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: PR build and merge
22

33
on:
4-
pull_request:
5-
types: [opened, synchronize, reopened]
64
push:
75
branches:
86
- main
@@ -15,7 +13,7 @@ jobs:
1513
build:
1614

1715
runs-on: ubuntu-latest
18-
timeout-minutes: 20
16+
timeout-minutes: 45
1917

2018
steps:
2119
- name: "Checkout"
@@ -41,9 +39,9 @@ jobs:
4139
run: docker compose run --service-ports app_test
4240

4341
- 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"
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"
4543
env:
46-
RP_LAUNCH: github-e2e-test
44+
RP_LAUNCH: github-e2e-push-${{ github.ref_name }}
4745
RP_ENDPOINT: ${{ secrets.RP_ENDPOINT }}
4846
RP_API_KEY: ${{ secrets.RP_API_KEY }}
4947

.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)