mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 17:05:18 +00:00
8457e55b53
* Bump go to 1.19.1 * Bump remaining go-version to the 1.19.1 * Add extra paths for test-go * Oops, putting the right path in the right place * gofmt file * gofmt ALL THE THINGS * Moar changes * Actually, go.mod doesn't like minor versions
44 lines
1.1 KiB
YAML
44 lines
1.1 KiB
YAML
name: Schema Change Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- patch-*
|
|
pull_request:
|
|
paths:
|
|
- 'server/datastore/mysql/schema.sql'
|
|
- 'server/datastore/mysql/migrations/**.go'
|
|
- '.github/workflows/test-schema-changes.yml'
|
|
workflow_dispatch: # Manual
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test-schema-changes:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install Go
|
|
uses: actions/setup-go@84cbf8094393cdc5fe1fe1671ff2647332956b1a # v2
|
|
with:
|
|
go-version: '^1.19.1'
|
|
- name: Checkout Code
|
|
uses: actions/checkout@629c2de402a417ea7690ca6ce3f33229e27606a5 # v2
|
|
|
|
- name: Start Infra Dependencies
|
|
# Use & to background this
|
|
run: docker-compose up -d mysql_test &
|
|
|
|
- name: Dump test schema
|
|
run: make dump-test-schema
|
|
|
|
- name: Verify changes
|
|
run: |
|
|
if [[ $(git diff server/datastore/mysql/schema.sql) ]]; then
|
|
echo "❌ fail: uncommited changes in schema.sql"
|
|
echo "please run make dump-test-schema and commit the changes"
|
|
exit 1
|
|
fi
|
|
|