mirror of
https://github.com/sablierapp/sablier.git
synced 2025-12-21 13:23:03 +01:00
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5 to 6. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/setup-go dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
361 lines
9.1 KiB
YAML
361 lines
9.1 KiB
YAML
name: Build Sablier plugins
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
jobs:
|
|
build:
|
|
name: Build Sablier docker image once and share it to E2E jobs
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
tags: sablierapp/sablier:local
|
|
outputs: type=docker,dest=/tmp/sablier.tar
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: sablier-image-tar
|
|
path: /tmp/sablier.tar
|
|
|
|
traefik:
|
|
name: Build Traefik Sablier Plugin
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Set up Go 1.22
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: 1.22
|
|
cache-dependency-path: plugins/traefik/go.sum
|
|
|
|
- name: Build
|
|
run: cd plugins/traefik && go build -v .
|
|
|
|
- name: Test
|
|
run: cd plugins/traefik && go test -v ./...
|
|
|
|
traefik_e2e:
|
|
name: Run Sablier E2E tests for Traefik middleware
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
provider: [docker, docker_swarm, kubernetes]
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Set up Go 1.22
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: 1.22
|
|
cache-dependency-path: |
|
|
go.sum
|
|
plugins/traefik/go.sum
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Download artifact
|
|
uses: actions/download-artifact@v5
|
|
with:
|
|
name: sablier-image-tar
|
|
path: /tmp
|
|
|
|
- name: Load Docker image
|
|
run: docker load --input /tmp/sablier.tar
|
|
|
|
- name: Test ${{ matrix.provider }}
|
|
run: cd plugins/traefik/e2e/${{ matrix.provider }} && bash ./run.sh
|
|
|
|
nginx_e2e:
|
|
name: Run Sablier E2E tests for Nginx NJS module with Sablier
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
provider: [docker, docker_swarm] # , kubernetes]
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Set up Go 1.22
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: 1.22
|
|
cache-dependency-path: |
|
|
go.sum
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Download artifact
|
|
uses: actions/download-artifact@v5
|
|
with:
|
|
name: sablier-image-tar
|
|
path: /tmp
|
|
|
|
- name: Load Docker image
|
|
run: docker load --input /tmp/sablier.tar
|
|
|
|
- name: Test ${{ matrix.provider }}
|
|
run: cd plugins/nginx/e2e/${{ matrix.provider }} && bash ./run.sh
|
|
|
|
caddy:
|
|
name: Build Caddy Sablier Plugin
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Set up Go 1.22
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: 1.22
|
|
cache-dependency-path: plugins/caddy/go.sum
|
|
|
|
- name: Build
|
|
run: cd plugins/caddy && go build -v .
|
|
|
|
- name: Test
|
|
run: cd plugins/caddy && go test -v ./...
|
|
|
|
build-caddy:
|
|
name: Build Caddy docker image once and share it to Caddy E2E jobs
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: plugins/caddy
|
|
file: plugins/caddy/Dockerfile
|
|
tags: caddy:local
|
|
outputs: type=docker,dest=/tmp/caddy.tar
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: caddy-image-tar
|
|
path: /tmp/caddy.tar
|
|
|
|
caddy_e2e:
|
|
name: Run Sablier E2E tests for Caddy middleware
|
|
runs-on: ubuntu-latest
|
|
needs:
|
|
- build
|
|
- build-caddy
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
provider: [docker, docker_swarm] # , kubernetes]
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Set up Go 1.22
|
|
uses: actions/setup-go@v6
|
|
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@v5
|
|
with:
|
|
name: sablier-image-tar
|
|
path: /tmp
|
|
|
|
- name: Load Docker image
|
|
run: docker load --input /tmp/sablier.tar
|
|
|
|
- name: Download Caddy artifact
|
|
uses: actions/download-artifact@v5
|
|
with:
|
|
name: caddy-image-tar
|
|
path: /tmp
|
|
|
|
- name: Load Caddy Docker image
|
|
run: docker load --input /tmp/caddy.tar
|
|
|
|
- name: Test ${{ matrix.provider }}
|
|
run: cd plugins/caddy/e2e/${{ matrix.provider }} && bash ./run.sh
|
|
|
|
build-proxywasm:
|
|
name: Build ProxyWasm Plugin once and share it to ProxyWasm E2E jobs
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Set up Go 1.24
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: 1.24
|
|
cache-dependency-path: |
|
|
plugins/proxywasm/go.sum
|
|
|
|
- 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@v5
|
|
|
|
- name: Set up Go 1.24
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: 1.24
|
|
cache-dependency-path: |
|
|
go.sum
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Download artifact
|
|
uses: actions/download-artifact@v5
|
|
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@v5
|
|
with:
|
|
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@v5
|
|
|
|
- name: Set up Go 1.22
|
|
uses: actions/setup-go@v6
|
|
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@v5
|
|
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@v5
|
|
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@v5
|
|
|
|
- name: Set up Go 1.22
|
|
uses: actions/setup-go@v6
|
|
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@v5
|
|
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@v5
|
|
with:
|
|
name: proxywasm-plugin-wasm
|
|
path: ./plugins/proxywasm
|
|
|
|
- name: Test ${{ matrix.provider }}
|
|
run: cd plugins/proxywasm/e2e/nginx/${{ matrix.provider }} && bash ./run.sh
|