diff --git a/.github/actions/action-e2e-setup/action.yml b/.github/actions/action-e2e-setup/action.yml new file mode 100644 index 0000000000..38b762aecc --- /dev/null +++ b/.github/actions/action-e2e-setup/action.yml @@ -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. + \ No newline at end of file diff --git a/.github/workflows/automated-tests.yml b/.github/workflows/automated-tests.yml index 07e82ce651..a9b594f53d 100644 --- a/.github/workflows/automated-tests.yml +++ b/.github/workflows/automated-tests.yml @@ -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 diff --git a/.github/workflows/manual-e2e.yml b/.github/workflows/manual-e2e.yml index e267aabbcf..b4669cd91f 100644 --- a/.github/workflows/manual-e2e.yml +++ b/.github/workflows/manual-e2e.yml @@ -9,16 +9,9 @@ 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: E2E Setup + uses: ./.github/actions/action-e2e-setup - name: E2E happy-path test run: go run ./tests/e2e/... --tc happy-path changeover-test: diff --git a/.github/workflows/nightly-e2e.yml b/.github/workflows/nightly-e2e.yml index f69125e6b8..80e7c10893 100644 --- a/.github/workflows/nightly-e2e.yml +++ b/.github/workflows/nightly-e2e.yml @@ -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: