Set up e2e with GitHub Actions #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |