Files
bryanpedini 65d16c2fc6
Test / test (push) Successful in 25m39s
Build and publish image / image (push) Successful in 16m16s
fix: replace named locks with Galera-compatible row locks
2026-11-20 16:27:15 +01:00

55 lines
1.8 KiB
YAML

name: Test
on:
push:
branches: [main]
schedule:
- cron: '23 4 * * 1'
workflow_dispatch:
concurrency:
group: coredns-web-ui-test
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Format, vet, staticcheck and race tests
run: |
set -eu
docker build --pull --target test --output type=cacheonly -f dockerfile .
- name: Integration tests against MySQL and MariaDB
run: |
set -eu
for database in mysql:5.7 mysql:8.4 mariadb:10.11; do
echo "Running integration tests against $database"
MYSQL_IMAGE="$database" IT_ID="${GITHUB_RUN_ID}" scripts/integration.sh
done
echo "Running integration tests against MariaDB Galera"
IT_GALERA=1 MYSQL_IMAGE=mariadb:10.11.3 IT_ID="${GITHUB_RUN_ID}" scripts/integration.sh
- name: Image and end-to-end tests
run: |
set -eu
commit=${GITHUB_SHA:0:12}
version="0.0.0-main.${commit}"
image="coredns-web-ui:test-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT:-1}"
if docker image inspect "$image" >/dev/null 2>&1; then
echo "::error::local image tag already exists: $image" >&2
exit 1
fi
docker build --build-arg APP_VERSION="$version" --build-arg COMMIT_ID="$commit" -f dockerfile -t "$image" .
trap 'docker image rm "$image" >/dev/null' EXIT
scripts/test-image.sh "$image" "$version" "$commit"
scripts/test-e2e.sh "$image"
- name: Save accessibility screenshots
if: always()
uses: actions/upload-artifact@v3
with:
name: accessibility-screenshots
path: e2e/reports/**/screenshots/*.png
if-no-files-found: warn