force minimal go version #101
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go package | |
on: [push] | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:8.0-debian | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: true | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_DATABASE: test | |
ports: | |
- 33306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
env: | |
DB_DATABASE: test_db | |
DB_USER: root | |
DB_PASSWORD: root | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '>=1.21.3' | |
- run: go version | |
- name: Build | |
run: make build | |
- name: Lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.55.1 | |
args: --timeout=5m | |
skip-cache: false | |
- name: Unit test | |
run: make test | |
- name: Start local MySQL | |
run: sudo systemctl start mysql | |
- name: MySQL Test | |
run: | | |
export PATH="$PATH:bin" | |
script/ci-github.sh | |
- name: Upload schemadiff binary artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: schemadiff | |
path: bin/schemadiff |