-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Geo monitoring tests * use prod env * comment from AI * fail proxy test * more time * Output region * add separate suite for synth monitoring (#429) * add separate suite for synth monitoring * updates * add more tests * clean up * readme * exact in quote synth monitoring * update branches --------- Co-authored-by: Roman <[email protected]>
- Loading branch information
1 parent
6943417
commit 6f3c44b
Showing
10 changed files
with
429 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
name: Synthetic Geo Monitoring SQS tests | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "*/20 * * * *" | ||
push: | ||
branches: | ||
- "main" | ||
- "v[0-9]**" | ||
|
||
jobs: | ||
setup-matrix: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
steps: | ||
- id: set-matrix | ||
run: | | ||
echo "matrix={\"include\":[{ \"server\":\"138.68.112.16:8888\", \"env\": \"prod-fra1\"}, {\"server\":\"139.59.218.19:8888\", \"env\": \"prod-sgp1\"}]}" >> "$GITHUB_OUTPUT" | ||
sqs-quote-tests: | ||
timeout-minutes: 15 | ||
name: ${{ matrix.env }}-sqs-quote-tests | ||
needs: setup-matrix | ||
runs-on: buildjet-4vcpu-ubuntu-2204 | ||
strategy: | ||
fail-fast: false | ||
matrix: ${{fromJson(needs.setup-matrix.outputs.matrix)}} | ||
steps: | ||
- name: Echo IP | ||
run: curl -L "https://ipinfo.io" -s | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
if [ -f tests/requirements.txt ]; then pip install -r tests/requirements.txt; fi | ||
- name: Run Swap tests on ${{ matrix.env }} | ||
env: | ||
SQS_ENVIRONMENTS: "prod" | ||
SQS_API_KEY: ${{ secrets.SQS_API_KEY }} | ||
HTTP_PROXY: "http://${{secrets.TEST_PROXY_CRED}}@${{ matrix.server }}" | ||
HTTPS_PROXY: "http://${{secrets.TEST_PROXY_CRED}}@${{ matrix.server }}" | ||
run: | | ||
pytest -s -n auto tests/test_synthetic_geo.py -v | ||
delete-deployments: | ||
runs-on: ubuntu-latest | ||
if: always() | ||
needs: | ||
[sqs-quote-tests] | ||
steps: | ||
- name: Delete Previous deployments | ||
uses: actions/github-script@v7 | ||
with: | ||
debug: true | ||
script: | | ||
const deployments = await github.rest.repos.listDeployments({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
sha: context.sha | ||
}); | ||
await Promise.all( | ||
deployments.data.map(async (deployment) => { | ||
await github.rest.repos.createDeploymentStatus({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
deployment_id: deployment.id, | ||
state: 'inactive' | ||
}); | ||
return github.rest.repos.deleteDeployment({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
deployment_id: deployment.id | ||
}); | ||
}) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.