Skip to content

Commit

Permalink
Introduce action for e2e setup
Browse files Browse the repository at this point in the history
  • Loading branch information
bermuell committed Aug 10, 2023
1 parent 704e35d commit fd52603
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 21 deletions.
22 changes: 22 additions & 0 deletions .github/actions/action-e2e-setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 'Setup environment'
description: 'Setup environment for E2E tests'
inputs:
go-version:
description: 'Version of go to be used'
required: true
default: '1.20'
runs:
using: "composite"
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ inputs.go-version}}
- uses: actions/checkout@v3
- name: Checkout LFS objects
run: git lfs checkout

- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ inputs.go-version}} # The Go version to download (if necessary) and use.

2 changes: 1 addition & 1 deletion .github/workflows/automated-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- release/v*
- feat/*
jobs:
Unit_Integration_Tests:
Automated_Tests:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/manual-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,10 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/setup-go@v4
with:
go-version: "1.20"
- uses: actions/checkout@v3
- name: Checkout LFS objects
run: git lfs checkout
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.20" # The Go version to download (if necessary) and use.
- name: Check out repo
uses: actions/checkout@v3
- name: E2E Setup
uses: ./.github/actions/action-e2e-setup
- name: E2E happy-path test
run: go run ./tests/e2e/... --tc happy-path
changeover-test:
Expand Down
68 changes: 58 additions & 10 deletions .github/workflows/nightly-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,69 @@ on:
- cron: "0 3 * * *"

jobs:
nightly-test:
happy-path-test:
runs-on: ubuntu-latest
timeout-minutes: 60
timeout-minutes: 20
steps:
- uses: actions/setup-go@v4
with:
go-version: "1.20"

- uses: actions/checkout@v3

- name: E2E tests
run: make test-e2e
- name: E2E Setup
uses: ./.github/actions/action-e2e-setup
- name: E2E happy-path test
run: go run ./tests/e2e/... --tc happy-path
changeover-test:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- name: E2E Setup
uses: ./.github/actions/action-e2e-setup
- name: E2E changeover test
run: go run ./tests/e2e/... --tc changeover
democracy-reward-test:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- name: E2E Setup
uses: ./.github/actions/action-e2e-setup
- name: E2E democracy-reward tests
run: go run ./tests/e2e/... --tc democracy-reward
democracy-test:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- name: E2E Setup
uses: ./.github/actions/action-e2e-setup
- name: E2E democracy tests
run: go run ./tests/e2e/... --tc democracy
slash-throttle-test:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- name: E2E Setup
uses: ./.github/actions/action-e2e-setup
- name: E2E slash-throttle tests
run: go run ./tests/e2e/... --tc slash-throttle
multiconsumer-test:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
- name: E2E Setup
uses: ./.github/actions/action-e2e-setup
- name: E2E multi-consumer tests
run: go run ./tests/e2e/... --tc multiconsumer

nightly-test-fail:
needs: nightly-test
needs:
- happy-path-test
- changeover-test
- democracy-reward-test
- democracy-test
- slash-throttle-test
- multiconsumer-test
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit fd52603

Please sign in to comment.