File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 os : [ubuntu-latest]
1919 python-version : ['3.7', '3.8', '3.9', '3.10']
2020 cratedb-version : ['nightly']
21- sqla-version : ['1.3.24 ']
21+ sqla-version : ['1.4.37 ']
2222 fail-fast : false
23+ env :
24+ CRATEDB_VERSION : ${{ matrix.cratedb-version }}
25+ SQLALCHEMY_VERSION : ${{ matrix.sqla-version }}
2326
2427 steps :
2528 - uses : actions/checkout@v3
@@ -28,13 +31,15 @@ jobs:
2831 with :
2932 python-version : ${{ matrix.python-version }}
3033
31- - name : Propagate matrix information
32- run : |
33- source bootstrap.sh
34- ./devtools/setup_ci.sh --cratedb-version=${{ matrix.cratedb-version }} --sqlalchemy-version=${{ matrix.sqla-version }}
35-
3634 - name : Invoke tests
3735 run : |
36+
37+ # Bootstrap environment.
3838 source bootstrap.sh
39+
40+ # Propagate build matrix information.
41+ ./devtools/setup_ci.sh
42+
43+ # Invoke validation tasks.
3944 flake8 src bin
4045 coverage run bin/test -vv1
Original file line number Diff line number Diff line change 2121 cratedb-version : ['4.8.0']
2222 sqla-version : ['1.3.24', '1.4.37']
2323 fail-fast : true
24+ env :
25+ CRATEDB_VERSION : ${{ matrix.cratedb-version }}
26+ SQLALCHEMY_VERSION : ${{ matrix.sqla-version }}
2427
2528 steps :
2629 - uses : actions/checkout@v3
@@ -29,22 +32,20 @@ jobs:
2932 with :
3033 python-version : ${{ matrix.python-version }}
3134
32- - name : Adjust environment for macOS
33- if : matrix.os == 'macos-latest'
35+ - name : Invoke tests
3436 run : |
35- brew install gnu-getopt
36- echo "/usr/local/opt/gnu-getopt/bin" >> $GITHUB_PATH
3737
38- - name : Propagate matrix information
39- run : |
38+ # Bootstrap environment.
4039 source bootstrap.sh
41- ./devtools/setup_ci.sh --cratedb-version=${{ matrix.cratedb-version }} --sqlalchemy-version=${{ matrix.sqla-version }}
4240
43- - name : Invoke tests
44- run : |
45- source bootstrap.sh
41+ # Propagate build matrix information.
42+ ./devtools/setup_ci.sh
43+
44+ # Invoke validation tasks.
4645 flake8 src bin
4746 coverage run bin/test -vv1
47+
48+ # Set the stage for the Codecov step.
4849 coverage xml
4950
5051 # https://github.com/codecov/codecov-action
Original file line number Diff line number Diff line change 1616# Trace all invocations.
1717# set -x
1818
19+ # Default variables.
20+ BUILDOUT_VERSION=${BUILDOUT_VERSION:- 2.13.7}
21+ CRATEDB_VERSION=${CRATEDB_VERSION:- 4.8.1}
22+ SQLALCHEMY_VERSION=${SQLALCHEMY_VERSION:- 1.4.37}
23+
1924
2025function print_header() {
2126 printf ' =%.0s' {1..42}; echo
@@ -50,8 +55,8 @@ function before_setup() {
5055 #
5156 pip install wheel
5257
53- BUILDOUT_VERSION= ${BUILDOUT_VERSION :- 2.13.7}
54- pip install " zc.buildout==${BUILDOUT_VERSION} "
58+ # Install Buildout with designated version, allowing pre-releases.
59+ pip install --pre " zc.buildout==${BUILDOUT_VERSION} "
5560
5661}
5762
@@ -70,7 +75,10 @@ function finalize() {
7075
7176 # Some steps before dropping into the activated virtualenv.
7277 echo
73- python -c ' import sqlalchemy; print(f"SQLAlchemy version: {sqlalchemy.__version__}")'
78+ echo " Sandbox environment ready"
79+ echo -n " Using SQLAlchemy version: "
80+ python -c ' import sqlalchemy; print(sqlalchemy.__version__)'
81+ echo
7482
7583}
7684
@@ -84,7 +92,7 @@ function main() {
8492}
8593
8694function lint() {
87- flake8
95+ flake8 " $@ " src bin
8896}
8997
9098main
Original file line number Diff line number Diff line change 22
33set -e
44
5- function args() {
6- options=$( getopt --long cratedb-version: --long sqlalchemy-version: -- " $@ " )
7- [ $? -eq 0 ] || {
8- echo " Incorrect options provided"
9- exit 1
10- }
11- eval set -- " $options "
12- while true ; do
13- case " $1 " in
14- --cratedb-version)
15- shift ;
16- cratedb_version=$1
17- ;;
18- --sqlalchemy-version)
19- shift ;
20- sqlalchemy_version=$1
21- ;;
22- --)
23- shift
24- break
25- ;;
26- esac
27- shift
28- done
29- }
30-
315function main() {
326
33- # Read command line arguments.
34- args $0 " $@ "
35-
367 # Sanity checks.
37- [ -z ${cratedb_version } ] && {
8+ [ -z ${CRATEDB_VERSION } ] && {
389 echo " --cratedb-version must be given"
10+ echo " Environment variable 'CRATEDB_VERSION' needed"
3911 exit 1
4012 }
41- [ -z ${sqlalchemy_version } ] && {
42- echo " --sqlalchemy-version must be given "
13+ [ -z ${SQLALCHEMY_VERSION } ] && {
14+ echo " Environment variable 'SQLALCHEMY_VERSION' needed "
4315 exit 1
4416 }
4517
4618 # Let's go.
47- echo " Invoking tests with CrateDB ${cratedb_version } and SQLAlchemy ${sqlalchemy_version } "
19+ echo " Invoking tests with CrateDB ${CRATEDB_VERSION } and SQLAlchemy ${SQLALCHEMY_VERSION } "
4820
4921 # Install designated SQLAlchemy version.
50- pip install " sqlalchemy==${sqlalchemy_version } "
22+ pip install " sqlalchemy==${SQLALCHEMY_VERSION } "
5123
5224 # Replace CrateDB version.
53- if [ ${cratedb_version } = " nightly" ]; then
25+ if [ ${CRATEDB_VERSION } = " nightly" ]; then
5426 sed -ir " s/releases/releases\/nightly/g" buildout.cfg
5527 sed -ir " s/crate_server.*/crate_server = latest/g" versions.cfg
5628 else
57- sed -ir " s/crate_server.*/crate_server = ${cratedb_version } /g" versions.cfg
29+ sed -ir " s/crate_server.*/crate_server = ${CRATEDB_VERSION } /g" versions.cfg
5830 fi
5931
6032}
You can’t perform that action at this time.
0 commit comments