Skip to content

Commit f1b8293

Browse files
committed
MPT-15326 Daily E2E cronjob
1 parent 5a75c11 commit f1b8293

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: daily-e2e.yml
2+
on:
3+
schedule:
4+
- cron: '0 8 * * *'
5+
6+
jobs:
7+
- name: "Checkout"
8+
uses: actions/checkout@v4
9+
with:
10+
ref: main
11+
12+
- name: "Build test containers"
13+
run: docker compose build app_test
14+
15+
- name: "Create environment file"
16+
run: env | grep -E '^MPT_' > .env
17+
env:
18+
RP_ENDPOINT: ${{ secrets.RP_ENDPOINT }}
19+
RP_API_KEY: ${{ secrets.RP_API_KEY }}
20+
MPT_API_BASE_URL: ${{ secrets.MPT_API_BASE_URL }}
21+
MPT_API_TOKEN: ${{ secrets.MPT_API_TOKEN }}
22+
MPT_API_TOKEN_CLIENT: ${{ secrets.MPT_API_TOKEN_CLIENT }}
23+
MPT_API_TOKEN_OPERATIONS: ${{ secrets.MPT_API_TOKEN_OPERATIONS }}
24+
MPT_API_TOKEN_VENDOR: ${{ secrets.MPT_API_TOKEN_VENDOR }}
25+
26+
- name: "Run validation & test"
27+
run: docker compose run --service-ports app_test
28+
29+
- name: "Run E2E test"
30+
run: docker compose run --service-ports app_test 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"
31+
env:
32+
RP_LAUNCH: github-e2e-cron-main
33+
RP_ENDPOINT: ${{ secrets.RP_ENDPOINT }}
34+
RP_API_KEY: ${{ secrets.RP_API_KEY }}
35+
36+
37+
- name: "Run SonarCloud Scan"
38+
uses: SonarSource/sonarqube-scan-action@master
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
42+
43+
- name: "Stop containers"
44+
if: always()
45+
run: docker compose down

0 commit comments

Comments
 (0)