Skip to content

Commit

Permalink
Add E2E tests
Browse files Browse the repository at this point in the history
  • Loading branch information
acouvreur committed Jun 28, 2024
1 parent 77b3d52 commit 35e07e5
Showing 1 changed file with 128 additions and 10 deletions.
138 changes: 128 additions & 10 deletions .github/workflows/plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -218,19 +218,137 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Build
run: make proxywasm

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: proxywasm-plugin-wasm
path: ./plugins/proxywasm/sablierproxywasm.wasm

proxywasm_apisix_e2e:
name: Run Sablier E2E tests for Proxywasm middleware on Apache APISIX
runs-on: ubuntu-latest
needs:
- build
- build-proxywasm
strategy:
fail-fast: false
matrix:
provider: [ docker ] #, docker_swarm, kubernetes]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: 1.22
cache-dependency-path: |
go.sum
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push
uses: docker/build-push-action@v6
- name: Download artifact
uses: actions/download-artifact@v4
with:
context: plugins/caddy
file: plugins/caddy/Dockerfile
tags: caddy:local
outputs: type=docker,dest=/tmp/caddy.tar
name: sablier-image-tar
path: /tmp

- name: Upload artifact
uses: actions/upload-artifact@v4
- name: Load Docker image
run: docker load --input /tmp/sablier.tar

- name: Download Proxywasm artifact
uses: actions/download-artifact@v4
with:
name: caddy-image-tar
path: /tmp/caddy.tar
name: proxywasm-plugin-wasm
path: ./plugins/proxywasm

- name: Test ${{ matrix.provider }}
run: cd plugins/proxywasm/e2e/apacheapisix/${{ matrix.provider }} && bash ./run.sh

proxywasm_envoy_e2e:
name: Run Sablier E2E tests for Proxywasm middleware on Envoy
runs-on: ubuntu-latest
needs:
- build
- build-proxywasm
strategy:
fail-fast: false
matrix:
provider: [ docker ] #, docker_swarm, kubernetes]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: 1.22
cache-dependency-path: |
go.sum
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Download artifact
uses: actions/download-artifact@v4
with:
name: sablier-image-tar
path: /tmp

- name: Load Docker image
run: docker load --input /tmp/sablier.tar

- name: Download Proxywasm artifact
uses: actions/download-artifact@v4
with:
name: proxywasm-plugin-wasm
path: ./plugins/proxywasm

- name: Test ${{ matrix.provider }}
run: cd plugins/proxywasm/e2e/envoy/${{ matrix.provider }} && bash ./run.sh

proxywasm_nginx_e2e:
name: Run Sablier E2E tests for Proxywasm middleware on Nginx
runs-on: ubuntu-latest
needs:
- build
- build-proxywasm
strategy:
fail-fast: false
matrix:
provider: [ docker ] #, docker_swarm, kubernetes]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: 1.22
cache-dependency-path: |
go.sum
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Download artifact
uses: actions/download-artifact@v4
with:
name: sablier-image-tar
path: /tmp

- name: Load Docker image
run: docker load --input /tmp/sablier.tar

- name: Download Proxywasm artifact
uses: actions/download-artifact@v4
with:
name: proxywasm-plugin-wasm
path: ./plugins/proxywasm

- name: Test ${{ matrix.provider }}
run: cd plugins/proxywasm/e2e/nginx/${{ matrix.provider }} && bash ./run.sh

0 comments on commit 35e07e5

Please sign in to comment.