-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
196 additions
and
86 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Nightly | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 2 * * *' | ||
|
||
|
||
jobs: | ||
nightly: | ||
name: "Python: ${{ matrix.python-version }} | ||
SQLA: ${{ matrix.sqla-version }} | ||
CrateDB: ${{ matrix.cratedb-version }} | ||
on ${{ matrix.os }}" | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: [3.5, 3.6, 3.7, 3.8, 3.9] | ||
cratedb-version: ['nightly'] | ||
sqla-version: ['1.1.18', '1.2.19', '1.3.23'] | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
./devtools/setup_ci.sh --cratedb-version=${{ matrix.cratedb-version }} --sqlalchemy-version=${{ matrix.sqla-version }} | ||
- name: Invoke tests | ||
run: | | ||
bin/flake8 | ||
bin/coverage run bin/test -vv1 |
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
test: | ||
name: "Python: ${{ matrix.python-version }} | ||
SQLA: ${{ matrix.sqla-version }} | ||
CrateDB: ${{ matrix.cratedb-version }} | ||
on ${{ matrix.os }}" | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
python-version: [3.5, 3.6, 3.7, 3.8, 3.9] | ||
cratedb-version: ['4.5.0'] | ||
sqla-version: ['1.1.18', '1.2.19', '1.3.23'] | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Adjust environment for macOS | ||
if: matrix.os == 'macos-latest' | ||
run: | | ||
brew install gnu-getopt | ||
echo "/usr/local/opt/gnu-getopt/bin" >> $GITHUB_PATH | ||
- name: Install dependencies | ||
run: | | ||
./devtools/setup_ci.sh --cratedb-version=${{ matrix.cratedb-version }} --sqlalchemy-version=${{ matrix.sqla-version }} | ||
- name: Invoke tests | ||
run: | | ||
bin/flake8 | ||
bin/coverage run bin/test -vv1 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
function args() { | ||
options=$(getopt --long cratedb-version: --long sqlalchemy-version: -- "$@") | ||
[ $? -eq 0 ] || { | ||
echo "Incorrect options provided" | ||
exit 1 | ||
} | ||
eval set -- "$options" | ||
while true; do | ||
case "$1" in | ||
--cratedb-version) | ||
shift; | ||
cratedb_version=$1 | ||
;; | ||
--sqlalchemy-version) | ||
shift; | ||
sqlalchemy_version=$1 | ||
;; | ||
--) | ||
shift | ||
break | ||
;; | ||
esac | ||
shift | ||
done | ||
} | ||
|
||
function main() { | ||
|
||
# Read command line arguments. | ||
args $0 "$@" | ||
|
||
# Sanity checks. | ||
[ -z ${cratedb_version} ] && { | ||
echo "--cratedb-version must be given" | ||
exit 1 | ||
} | ||
[ -z ${sqlalchemy_version} ] && { | ||
echo "--sqlalchemy-version must be given" | ||
exit 1 | ||
} | ||
|
||
# Let's go. | ||
echo "Invoking tests with CrateDB ${cratedb_version} and SQLAlchemy ${sqlalchemy_version}" | ||
|
||
python -m pip install --upgrade pip | ||
|
||
# Workaround needed for Python 3.5 | ||
python -m pip install --upgrade "setuptools>=31,<51" | ||
|
||
pip install zc.buildout==2.13.4 | ||
|
||
# Replace SQLAlchemy version. | ||
sed -ir "s/SQLAlchemy.*/SQLAlchemy = ${sqlalchemy_version}/g" versions.cfg | ||
|
||
# Replace CrateDB version. | ||
if [ ${cratedb_version} = "nightly" ]; then | ||
sed -ir "s/releases/releases\/nightly/g" base.cfg | ||
sed -ir "s/crate_server.*/crate_server = latest/g" versions.cfg | ||
else | ||
sed -ir "s/crate_server.*/crate_server = ${cratedb_version}/g" versions.cfg | ||
fi | ||
|
||
buildout -n -c base.cfg | ||
|
||
} | ||
|
||
main "$@" |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[versions] | ||
crate_server = 4.4.2 | ||
crate_server = 4.5.0 | ||
|
||
flake8 = 3.7.9 | ||
mccabe = 0.6.1 | ||
|