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
39 changes: 39 additions & 0 deletions .github/workflows/cron-main-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: daily-e2e.yml
on:
schedule:
- cron: '0 8 * * *'

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: "Checkout"
uses: actions/checkout@v4
with:
ref: main

- name: "Build test containers"
run: docker compose build e2e

- name: "Create environment file"
run: env | grep -E '^MPT_' > .env
env:
RP_ENDPOINT: ${{ secrets.RP_ENDPOINT }}
RP_API_KEY: ${{ secrets.RP_API_KEY }}
MPT_API_BASE_URL: ${{ secrets.MPT_API_BASE_URL }}
MPT_API_TOKEN: ${{ secrets.MPT_API_TOKEN }}
MPT_API_TOKEN_CLIENT: ${{ secrets.MPT_API_TOKEN_CLIENT }}
MPT_API_TOKEN_OPERATIONS: ${{ secrets.MPT_API_TOKEN_OPERATIONS }}
MPT_API_TOKEN_VENDOR: ${{ secrets.MPT_API_TOKEN_VENDOR }}

- name: "Run E2E test"
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"
env:
RP_LAUNCH: github-e2e-cron-main
RP_ENDPOINT: ${{ secrets.RP_ENDPOINT }}
RP_API_KEY: ${{ secrets.RP_API_KEY }}

- name: "Stop containers"
if: always()
run: docker compose down
4 changes: 2 additions & 2 deletions .github/workflows/pr-build-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
fetch-depth: 0

- name: "Build test containers"
run: docker compose build app_test
run: docker compose build app_test e2e

- name: "Create environment file"
run: env | grep -E '^MPT_' > .env
Expand All @@ -41,7 +41,7 @@ jobs:
run: docker compose run --service-ports app_test

- name: "Run E2E test"
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"
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"
env:
RP_LAUNCH: github-e2e-test
RP_ENDPOINT: ${{ secrets.RP_ENDPOINT }}
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,27 @@ jobs:
with:
fetch-depth: 0

- name: "Build test containers"
run: docker compose build e2e

- name: "Create environment file"
run: env | grep -E '^MPT_' > .env
env:
RP_ENDPOINT: ${{ secrets.RP_ENDPOINT }}
RP_API_KEY: ${{ secrets.RP_API_KEY }}
MPT_API_BASE_URL: ${{ secrets.MPT_API_BASE_URL }}
MPT_API_TOKEN: ${{ secrets.MPT_API_TOKEN }}
MPT_API_TOKEN_CLIENT: ${{ secrets.MPT_API_TOKEN_CLIENT }}
MPT_API_TOKEN_OPERATIONS: ${{ secrets.MPT_API_TOKEN_OPERATIONS }}
MPT_API_TOKEN_VENDOR: ${{ secrets.MPT_API_TOKEN_VENDOR }}

- name: "Run E2E test"
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"
env:
RP_LAUNCH: github-e2e-cron-main
RP_ENDPOINT: ${{ secrets.RP_ENDPOINT }}
RP_API_KEY: ${{ secrets.RP_API_KEY }}

- name: "Set up Python"
uses: actions/setup-python@v5
with:
Expand Down