-
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dialect trigger + version fixes (#85)
* add sql dialect trigger + fix breakage * update ci * update ci * fix dependent ci * use diff path * fix path
- Loading branch information
1 parent
60f7005
commit d6f72bb
Showing
4 changed files
with
89 additions
and
25 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,91 @@ | ||
name: test | ||
on: | ||
- pull_request | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
defaults: | ||
run: | ||
shell: bash | ||
jobs: | ||
sqlite-kit_bionic: | ||
container: | ||
image: vapor/swift:5.2-bionic | ||
dependents: | ||
runs-on: ubuntu-latest | ||
container: swift:5.2-bionic | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
dependent: | ||
- fluent-sqlite-driver | ||
steps: | ||
- run: apt update -y; apt install -y libsqlite3-dev | ||
- uses: actions/checkout@v1 | ||
- run: swift test --enable-test-discovery --sanitize=thread | ||
sqlite-kit_xenial: | ||
container: | ||
image: vapor/swift:5.2-xenial | ||
- name: Install dependencies | ||
run: apt-get -q update && apt-get -q install -y libsqlite3-dev | ||
- name: Check out SQLiteKit | ||
uses: actions/checkout@v2 | ||
with: | ||
path: sqlite-kit | ||
- name: Check out dependent | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: vapor/${{ matrix.dependent }} | ||
path: dependent | ||
- name: Use local package | ||
run: swift package edit sqlite-kit --path ../sqlite-kit | ||
working-directory: dependent | ||
- name: Run tests with Thread Sanitizer | ||
run: swift test --enable-test-discovery --sanitize=thread | ||
working-directory: dependent | ||
linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
image: | ||
# 5.2 Stable | ||
- swift:5.2-xenial | ||
- swift:5.2-bionic | ||
# 5.2 Unstable | ||
- swiftlang/swift:nightly-5.2-xenial | ||
- swiftlang/swift:nightly-5.2-bionic | ||
# 5.3 Unstable | ||
- swiftlang/swift:nightly-5.3-xenial | ||
- swiftlang/swift:nightly-5.3-bionic | ||
# Master Unsable | ||
- swiftlang/swift:nightly-master-xenial | ||
- swiftlang/swift:nightly-master-bionic | ||
- swiftlang/swift:nightly-master-focal | ||
- swiftlang/swift:nightly-master-centos8 | ||
- swiftlang/swift:nightly-master-amazonlinux2 | ||
container: ${{ matrix.image }} | ||
steps: | ||
- run: apt update -y; apt install -y libsqlite3-dev | ||
- uses: actions/checkout@v1 | ||
- run: swift test --enable-test-discovery --sanitize=thread | ||
fluent-sqlite-driver: | ||
container: | ||
image: vapor/swift:5.2 | ||
runs-on: ubuntu-latest | ||
- name: Install Ubuntu dependencies | ||
run: apt-get -q update && apt-get -q install -y libsqlite3-dev | ||
if: ${{ endsWith(matrix.image, 'xenial') || endsWith(matrix.image, 'bionic') || endsWith(matrix.image, 'focal') }} | ||
- name: Install CentOS deps | ||
run: dnf install -y sqlite-devel | ||
if: ${{ endsWith(matrix.image, 'centos8') }} | ||
- name: Update AmazonLinux2's too-old SQLite and compensate for its Postgres | ||
if: ${{ endsWith(matrix.image, 'amazonlinux2') }} | ||
working-directory: /root | ||
# Cribbed from the Fedora RPM, leaves out a lot. System's Tcl is too old to run SQLite's tests. | ||
run: | | ||
yum install -y sqlite-devel | ||
yum install -y file tcl-devel make | ||
curl -L 'https://www.sqlite.org/src/tarball/sqlite.tar.gz?r=release' | tar xz && cd sqlite | ||
export CFLAGS="-DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_SECURE_DELETE=1" | ||
./configure --prefix=/usr --libdir=/usr/lib64 --enable-fts3 --enable-all --with-tcl=/usr/lib64 | ||
make all install | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Run tests with Thread Sanitizer | ||
run: swift test --enable-test-discovery --sanitize=thread | ||
macOS: | ||
runs-on: macos-latest | ||
steps: | ||
- run: apt update -y; apt install -y libsqlite3-dev | ||
- run: git clone -b master https://github.com/vapor/fluent-sqlite-driver.git | ||
working-directory: ./ | ||
- run: swift package edit sqlite-kit --revision ${{ github.sha }} | ||
working-directory: ./fluent-sqlite-driver | ||
- run: swift test --enable-test-discovery --sanitize=thread | ||
working-directory: ./fluent-sqlite-driver | ||
- name: Select latest available Xcode | ||
uses: maxim-lobanov/[email protected] | ||
with: | ||
xcode-version: latest | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Run tests with Thread Sanitizer | ||
run: swift test --enable-test-discovery --sanitize=thread |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,5 @@ Package.pins | |
Package.resolved | ||
DerivedData | ||
.swiftpm | ||
Tests/LinuxMain.swift | ||
|
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
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