diff --git a/.github/workflows/on-push.yaml b/.github/workflows/on-push.yaml new file mode 100644 index 0000000..897e4d2 --- /dev/null +++ b/.github/workflows/on-push.yaml @@ -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) }} diff --git a/.github/workflows/run-e2e-tests.yaml b/.github/workflows/run-e2e-tests.yaml index aff8ad5..f25eec3 100644 --- a/.github/workflows/run-e2e-tests.yaml +++ b/.github/workflows/run-e2e-tests.yaml @@ -1,12 +1,7 @@ name: E2E Tests on: - pull_request: - branches: - - main - push: - branches: - - main + workflow_dispatch: permissions: checks: write @@ -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 diff --git a/.github/workflows/sleep-and-test.yaml b/.github/workflows/sleep-and-test.yaml new file mode 100644 index 0000000..1aaac6f --- /dev/null +++ b/.github/workflows/sleep-and-test.yaml @@ -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