From 19728626d627749eac34baeb8679d33e7704cb90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20L=C3=B3pez=20de=20la=20Franca=20Beltran?= Date: Tue, 14 May 2024 00:33:49 +0200 Subject: [PATCH] Set up e2e with GitHub Actions --- .github/workflows/e2e-test.yml | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/e2e-test.yml diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml new file mode 100644 index 0000000..a39bb45 --- /dev/null +++ b/.github/workflows/e2e-test.yml @@ -0,0 +1,41 @@ +name: End-to-end test + +on: + workflow_dispatch: + push: + branches: + - main + tags: + - v* + pull_request: + +jobs: + e2e-test: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up OpenTofu + uses: opentofu/setup-opentofu@v1 + + - name: Run Localstack & populate environment + run: | + cd examples + docker compose up -d + tofu init + tofu apply -auto-approve + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.21.x' + - name: Build the extension + run: | + go install go.k6.io/xk6/cmd/xk6@master + GOPRIVATE="go.k6.io/k6" xk6 build \ + --output ./k6 \ + --with github.com/joanlopez/xk6-aws=./ + - name: Run k6 test + run: | + ./k6 run examples/s3.js