Skip to content

Commit

Permalink
Merge pull request #109 from fasmat/fix/broken-dependency-to-pop
Browse files Browse the repository at this point in the history
Fix broken dependency to pop
  • Loading branch information
paganotoni authored Nov 24, 2021
2 parents 33f521c + 432a739 commit d179daf
Show file tree
Hide file tree
Showing 18 changed files with 561 additions and 494 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
275 changes: 97 additions & 178 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
name: Tests
on: [push, pull_request]
on:
push:
branches:
- master
pull_request:

jobs:
mysql-tests:
name: MySQL tests
name: MySQL tests - Go v${{ matrix.go-version }}
runs-on: ubuntu-latest
strategy:
matrix:
go-version:
- "1.16.x"
- "1.17.x"

services:
mysql:
Expand All @@ -18,59 +28,49 @@ jobs:
options: --health-cmd "mysqladmin ping -h localhost" --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- name: Set up Go
- uses: actions/checkout@v2
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v2
with:
go-version: 1.16
id: go
- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Get dependencies
run: |
go get -v -tags sqlite -t -d ./...
- name: Install soda
env:
GO111MODULE: "off"
run: |
mkdir -p "$HOME/go/bin"
go get -v -tags sqlite github.com/gobuffalo/soda
shell: bash
- name: Run soda
go-version: ${{ matrix.go-version }}

- name: Install and run soda
env:
SODA_DIALECT: "mysql"
MYSQL_PORT: 3307
run: |
$HOME/go/bin/soda drop -e $SODA_DIALECT -p ./testdata/migrations
$HOME/go/bin/soda create -e $SODA_DIALECT -p ./testdata/migrations
$HOME/go/bin/soda migrate -e $SODA_DIALECT -p ./testdata/migrations
go install -tags sqlite github.com/gobuffalo/pop/v6/soda@latest
soda drop -e $SODA_DIALECT -p ./testdata/migrations
soda create -e $SODA_DIALECT -p ./testdata/migrations
soda migrate -e $SODA_DIALECT -p ./testdata/migrations
- name: Test
env:
SODA_DIALECT: "mysql"
MYSQL_PORT: 3307
run: |
go test -tags sqlite -race ./...
- name: Reset soda
env:
SODA_DIALECT: "sqlite"
run: |
$HOME/go/bin/soda drop -e $SODA_DIALECT -p ./testdata/migrations
$HOME/go/bin/soda create -e $SODA_DIALECT -p ./testdata/migrations
shell: bash
- name: Run e2e
- name: Reset soda and run e2e
env:
SODA_DIALECT: "sqlite"
run: |
soda drop -e $SODA_DIALECT -p ./testdata/migrations
soda create -e $SODA_DIALECT -p ./testdata/migrations
go test -tags sqlite,e2e -race ./internal/e2e/...
pg-tests:
name: PostgreSQL tests
name: PostgreSQL tests - Go v${{ matrix.go-version }}
runs-on: ubuntu-latest
strategy:
matrix:
go-version:
- "1.16.x"
- "1.17.x"

services:
postgres:
image: postgres:10.8
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
Expand All @@ -81,212 +81,131 @@ jobs:
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- name: Set up Go
- uses: actions/checkout@v2
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v2
with:
go-version: 1.16
id: go
- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Get dependencies
run: |
go get -v -tags sqlite -t -d ./...
- name: Install soda
env:
GO111MODULE: "off"
run: |
mkdir -p "$HOME/go/bin"
go get -v -tags sqlite github.com/gobuffalo/soda
shell: bash
- name: Run soda
go-version: ${{ matrix.go-version }}

- name: Install and run soda
env:
SODA_DIALECT: "postgres"
POSTGRESQL_URL: "postgres://postgres:postgres@${{job.services.postgres.host}}:${{ job.services.postgres.ports[5432] }}/pop_test?sslmode=disable"
run: |
$HOME/go/bin/soda drop -e $SODA_DIALECT -p ./testdata/migrations
$HOME/go/bin/soda create -e $SODA_DIALECT -p ./testdata/migrations
$HOME/go/bin/soda migrate -e $SODA_DIALECT -p ./testdata/migrations
go install -tags sqlite github.com/gobuffalo/pop/v6/soda@latest
soda drop -e $SODA_DIALECT -p ./testdata/migrations
soda create -e $SODA_DIALECT -p ./testdata/migrations
soda migrate -e $SODA_DIALECT -p ./testdata/migrations
- name: Test
env:
SODA_DIALECT: "postgres"
POSTGRESQL_URL: "postgres://postgres:postgres@${{job.services.postgres.host}}:${{ job.services.postgres.ports[5432] }}/pop_test?sslmode=disable"
run: |
go test -tags sqlite -race ./...
- name: Reset soda
env:
SODA_DIALECT: "sqlite"
run: |
$HOME/go/bin/soda drop -e $SODA_DIALECT -p ./testdata/migrations
$HOME/go/bin/soda create -e $SODA_DIALECT -p ./testdata/migrations
shell: bash
- name: Run e2e
- name: Reset soda and run e2e
env:
SODA_DIALECT: "sqlite"
run: |
soda drop -e $SODA_DIALECT -p ./testdata/migrations
soda create -e $SODA_DIALECT -p ./testdata/migrations
go test -tags sqlite,e2e -race ./internal/e2e/...
crdb-tests:
name: Cockroach tests
name: Cockroach tests - Go v${{ matrix.go-version }}
runs-on: ubuntu-latest
strategy:
matrix:
go-version:
- "1.16.x"
- "1.17.x"

steps:
- name: Set up Go
- uses: actions/checkout@v2
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v2
with:
go-version: 1.16
id: go
- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Get dependencies
run: |
go get -v -tags sqlite -t -d ./...
go-version: ${{ matrix.go-version }}

- name: Install Cockroach
run: |
mkdir -p crdb
pushd crdb
wget -qO- https://binaries.cockroachdb.com/cockroach-v2.1.0.linux-amd64.tgz | tar zxv
mv cockroach-v2.1.0.linux-amd64/cockroach .
./cockroach start --insecure --background
wget -qO- https://binaries.cockroachdb.com/cockroach-v2.1.0.linux-amd64.tgz | tar -xz
sudo cp -i cockroach-v2.1.0.linux-amd64/cockroach /usr/local/bin/
cockroach start --insecure --background
popd
- name: Install soda
env:
GO111MODULE: "off"
run: |
mkdir -p "$HOME/go/bin"
go get -v -tags sqlite github.com/gobuffalo/soda
shell: bash
- name: Run soda
- name: Install and run soda
env:
SODA_DIALECT: "cockroach"
run: |
$HOME/go/bin/soda drop -e $SODA_DIALECT -p ./testdata/migrations
$HOME/go/bin/soda create -e $SODA_DIALECT -p ./testdata/migrations
$HOME/go/bin/soda migrate -e $SODA_DIALECT -p ./testdata/migrations
go install -tags sqlite github.com/gobuffalo/pop/v6/soda@latest
soda drop -e $SODA_DIALECT -p ./testdata/migrations
soda create -e $SODA_DIALECT -p ./testdata/migrations
soda migrate -e $SODA_DIALECT -p ./testdata/migrations
- name: Test
env:
SODA_DIALECT: "cockroach"
run: |
go test -tags sqlite -race ./...
- name: Reset soda
env:
SODA_DIALECT: "sqlite"
run: |
$HOME/go/bin/soda drop -e $SODA_DIALECT -p ./testdata/migrations
$HOME/go/bin/soda create -e $SODA_DIALECT -p ./testdata/migrations
shell: bash
- name: Run e2e
env:
SODA_DIALECT: "sqlite"
run: |
go test -tags sqlite,e2e -race ./internal/e2e/...
sqlite-tests-windows:
name: SQLite tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
steps:
- name: Install sqlite3
run: choco install sqlite
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
id: go
- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Get dependencies
run: |
go get -v -tags sqlite -t -d ./...
- name: Install soda
env:
GO111MODULE: "off"
run: |
mkdir -p "$HOME/go/bin"
go get -v -tags sqlite github.com/gobuffalo/soda
shell: bash
- name: Run soda
env:
SODA_DIALECT: "sqlite"
run: |
$HOME/go/bin/soda drop -e $SODA_DIALECT -p ./testdata/migrations
$HOME/go/bin/soda create -e $SODA_DIALECT -p ./testdata/migrations
$HOME/go/bin/soda migrate -e $SODA_DIALECT -p ./testdata/migrations
shell: bash
- name: Test
env:
SODA_DIALECT: "sqlite"
run: |
go test -tags sqlite -race ./...
- name: Reset soda
env:
SODA_DIALECT: "sqlite"
run: |
$HOME/go/bin/soda drop -e $SODA_DIALECT -p ./testdata/migrations
$HOME/go/bin/soda create -e $SODA_DIALECT -p ./testdata/migrations
shell: bash
- name: Run e2e
- name: Reset soda and run e2e
env:
SODA_DIALECT: "sqlite"
run: |
soda drop -e $SODA_DIALECT -p ./testdata/migrations
soda create -e $SODA_DIALECT -p ./testdata/migrations
go test -tags sqlite,e2e -race ./internal/e2e/...
sqlite-tests:
name: SQLite tests
name: SQLite tests ${{ matrix.os }} - Go v${{ matrix.go-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
go-version:
- "1.16.x"
- "1.17.x"
os:
- "macos-latest"
- "windows-latest"
- "ubuntu-latest"

steps:
- name: Set up Go
- name: Install sqlite3
run: choco install sqlite
if: matrix.os == 'windows-latest'

- uses: actions/checkout@v2
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v2
with:
go-version: 1.16
id: go
- name: Checkout Code
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Get dependencies
run: |
go get -v -tags sqlite -t -d ./...
- name: Install soda
env:
GO111MODULE: "off"
run: |
mkdir -p "$HOME/go/bin"
go get -v -tags sqlite github.com/gobuffalo/soda
shell: bash
- name: Run soda
go-version: ${{ matrix.go-version }}

- name: Install and run soda
env:
SODA_DIALECT: "sqlite"
run: |
$HOME/go/bin/soda drop -e $SODA_DIALECT -p ./testdata/migrations
$HOME/go/bin/soda create -e $SODA_DIALECT -p ./testdata/migrations
$HOME/go/bin/soda migrate -e $SODA_DIALECT -p ./testdata/migrations
go install -tags sqlite github.com/gobuffalo/pop/v6/soda@latest
soda drop -e $SODA_DIALECT -p ./testdata/migrations
soda create -e $SODA_DIALECT -p ./testdata/migrations
soda migrate -e $SODA_DIALECT -p ./testdata/migrations
shell: bash

- name: Test
env:
SODA_DIALECT: "sqlite"
run: |
go test -tags sqlite -race ./...
- name: Reset soda
env:
SODA_DIALECT: "sqlite"
run: |
$HOME/go/bin/soda drop -e $SODA_DIALECT -p ./testdata/migrations
$HOME/go/bin/soda create -e $SODA_DIALECT -p ./testdata/migrations
shell: bash
- name: Run e2e

- name: Reset soda and run e2e
env:
SODA_DIALECT: "sqlite"
run: |
soda drop -e $SODA_DIALECT -p ./testdata/migrations
soda create -e $SODA_DIALECT -p ./testdata/migrations
go test -tags sqlite,e2e -race ./internal/e2e/...
shell: bash
3 changes: 0 additions & 3 deletions .gometalinter.json

This file was deleted.

Loading

0 comments on commit d179daf

Please sign in to comment.