Skip to content

Commit

Permalink
test: throttled requests
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenvechain committed Mar 5, 2024
1 parent f99445e commit 7a0f650
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 10 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/on-push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: On Push

on:
push:
branches:
- '*'

jobs:
run-test:
strategy:
matrix:
index: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 ]
uses: ./.github/actions/sleep-and-test.yaml
with:
sleep_duration: ${{ mul(3, matrix.index) }}
11 changes: 1 addition & 10 deletions .github/workflows/run-e2e-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
name: E2E Tests

on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:

permissions:
checks: write
Expand All @@ -19,10 +14,6 @@ concurrency:
jobs:
e2e_tests:
name: Run E2E Tests
strategy:
fail-fast: false
matrix:
test-reliability: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ]
runs-on: runs-on,cpu=4,ram=16,family=t2,hdd=100,spot=false
steps:
- name: Checkout code
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/sleep-and-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Sleep & Test

on:
workflow_dispatch:
inputs:
sleep_duration:
description: 'Duration to sleep before running tests'
required: true
default: 10

jobs:
sleep:
runs-on: ubuntu-latest
steps:
- name: Sleep
run: |
sleep ${{ github.event.inputs.sleep_duration }}
e2e_tests:
needs: sleep
uses: ./.github/actions/run-e2e-tests.yaml

0 comments on commit 7a0f650

Please sign in to comment.