Skip to content

migrate/push: added action and tests #49

migrate/push: added action and tests

migrate/push: added action and tests #49

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: '1.21'
- 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: ariga/setup-atlas@v0
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Run tests
run: go test -race ./...
integration-test:
runs-on: ubuntu-latest
steps:
- uses: ariga/setup-atlas@v0
with:
cloud-token: ${{ secrets.INTEGRATION_ATLAS_CLOUD_TOKEN }}
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- run: go install ./cmd/atlas-action
- uses: ./migrate/apply
with:
dir: file://atlasaction/testdata/migrations
url: sqlite://file.db?mode=memory
- uses: ./migrate/push
with:
dir: file://atlasaction/testdata/migrations
dir-name: test-dir
dev-url: sqlite://file.db?mode=memory