forked from vmangos/core
-
Notifications
You must be signed in to change notification settings - Fork 5
47 lines (41 loc) · 1.44 KB
/
pr-sql-check.yaml
File metadata and controls
47 lines (41 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Validate SQL changes on pull requests.
name: Pull Request SQL Check
on:
pull_request:
paths:
- '.github/scripts/export-and-verify-sql-dumps.sh'
- '.github/scripts/prepare-sql-test-environment.sh'
- '.github/workflows/pr-sql-check.yaml'
- '**/*.sql'
env:
WORLD_DB_ARCHIVE: world_full_14_june_2021
jobs:
build:
name: Validate SQL changes
runs-on: ubuntu-24.04
permissions:
contents: read
services:
mysql56:
# Public Docker Hub pulls on GitHub-hosted runners are exempt from
# Docker Hub rate limits:
# https://docs.github.com/actions/reference/limits#docker-hubs-rate-limit-for-github-actions
image: mysql:5.6
env:
MYSQL_ROOT_PASSWORD: root
options: >-
--health-cmd="mysqladmin ping -h 127.0.0.1 -u root -proot --silent"
--health-interval=10s
--health-timeout=5s
--health-retries=12
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Prepare SQL test environment
env:
MYSQL_CONTAINER_ID: ${{ job.services.mysql56.id }}
run: ./.github/scripts/prepare-sql-test-environment.sh "${{ env.WORLD_DB_ARCHIVE }}"
- name: Export and verify migrated databases
env:
MYSQL_CONTAINER_ID: ${{ job.services.mysql56.id }}
run: ./.github/scripts/export-and-verify-sql-dumps.sh "${{ github.workspace }}/database-artifacts"