Skip to content

Build and Run Integration Tests Docker #396

Build and Run Integration Tests Docker

Build and Run Integration Tests Docker #396

name: Build and Run Integration Tests Docker
on:
workflow_dispatch:
schedule:
# Every day at the 1am
- cron: '0 1 * * *'
jobs:
publish:
name: Build, Push and Run Docker Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
-
name: Set up QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
-
name: Login to GitHub Container Registry
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push Docker image
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
context: docker
file: docker/Dockerfile-tests
platforms: linux/amd64,linux/arm64
push: true
provenance: false
tags: |
ghcr.io/zaproxy/zaproxy-tests
secrets: |
webswing_url=${{ secrets.WEBSWING_URL }}
annotations: |
index:org.opencontainers.image.source=https://github.com/zaproxy/zaproxy
index:org.opencontainers.image.description=Docker image used for ZAP integration tests.
index:org.opencontainers.image.licenses=Apache-2.0
-
name: Run install tests
id: "test-install"
if: ${{ ! cancelled() }}
run: docker run --rm -t ghcr.io/zaproxy/zaproxy-tests wrk/install_tests.sh
-
name: Run python tests
id: "test-python"
if: ${{ ! cancelled() }}
run: docker run --rm -t ghcr.io/zaproxy/zaproxy-tests wrk/python_tests.sh
-
name: Automation Framework context tests
id: "test-af-context"
if: ${{ ! cancelled() }}
run: docker run --rm -t ghcr.io/zaproxy/zaproxy-tests wrk/af_context_tests.sh
-
name: Automation Framework plan tests
id: "test-af-plan"
if: ${{ ! cancelled() }}
run: docker run --rm -t ghcr.io/zaproxy/zaproxy-tests wrk/af_plan_tests.sh
-
# Run these last as they are most likely to fail
name: Run baseline tests
if: ${{ ! cancelled() }}
run: docker run --rm -t ghcr.io/zaproxy/zaproxy-tests wrk/baseline_tests.sh