Files
mysql-bkup/.github/workflows/tests.yml
T
jkaninda 28de0d7b52 feat: mysql-bkup v2 on bkupkit
MysQL backup and restore built on the shared bkupkit core:
streaming end to end, with no dump held in memory or written to
local disk.
2026-10-28 11:18:56 +01:00

53 lines
1.5 KiB
YAML

name: Tests
on:
push:
branches:
- main
- nightly
- v2
pull_request:
branches:
- main
jobs:
unit:
name: Vet and unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version: '1.26'
- name: Vet
run: |
go vet ./...
go vet -tags integration ./...
- name: Unit tests
run: go test -race ./...
- name: Env reference is up to date
run: go run . config --env-docs > /dev/null
integration:
name: Integration tests (MySQL 8.4 / 8.0, MariaDB 11.8, MinIO)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version: '1.26'
- uses: docker/setup-buildx-action@v4
- name: Build the image
run: docker buildx build --build-arg appVersion=test -t mysql-bkup:test --load .
- name: Image smoke test
run: |
docker run --rm mysql-bkup:test version
docker run --rm --entrypoint mysqldump mysql-bkup:test --version
docker run --rm --entrypoint mariadb-dump mysql-bkup:test --version
# Miabi deletes local backups with /bin/sh
docker run --rm --entrypoint /bin/sh mysql-bkup:test -c "rm -f /backup/x.sql.gz"
- name: Integration tests (client tools from the image)
env:
IT_CLIENT_IMAGE: mysql-bkup:test
run: go test -tags integration -count=1 -timeout 40m -v ./...