Skip to content

gormschema: support view for standalone mode #118

gormschema: support view for standalone mode

gormschema: support view for standalone mode #118

Workflow file for this run

name: Go Continuous Integration
on:
push:
branches:
- master
pull_request:
jobs:
golangci-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Run Go linters
uses: golangci/golangci-lint-action@v3
with:
args: --verbose --timeout=5m
skip-pkg-cache: true
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
- name: Run tests
run: go test -race ./...
integration-test:
strategy:
matrix:
dialect: [mysql, postgres, sqlite, sqlserver]
go: ['1.21', '1.22']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- run: |
curl -sSf 'https://atlasgo.sh?test=1' | sh
env:
ATLAS_DEBUG: true
- working-directory: internal/testdata
run: |
atlas migrate diff --env gorm --var dialect=${{ matrix.dialect }}
env:
ATLAS_TOKEN: ${{ secrets.ATLAS_TOKEN }}
- working-directory: internal/testdata/circularfks
run: |
atlas migrate diff --env gorm --var dialect=${{ matrix.dialect }}
env:
ATLAS_TOKEN: ${{ secrets.ATLAS_TOKEN }}
- name: Verify migrations generated
run: |
status=$(git status --porcelain)
if [ -n "$status" ]; then
echo "you need to run 'atlas migrate diff --env gorm' and commit the changes"
echo "$status"
git --no-pager diff
exit 1
fi