fleet/.github/workflows/test-schema-changes.yml
Tomas Touceda 8457e55b53
Bump go to 1.19.1 (#7690)
* 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
2022-09-12 20:32:43 -03:00

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