Skip to content

Commit

Permalink
Remove Python 2.7 builds from GitHub Actions
Browse files Browse the repository at this point in the history
Support for 2.7 builds has been removed from GitHub Actions, so we'll
keep failing our CI tests unless we follow suit.

Other than removing the job from the build matrix, the main change we
need to introduce is porting our testing infrastructure from the
MySQL-python package to mysqlclient, the latter supporting Python 3.

Signed-off-by: Rodrigo Tobar <[email protected]>
  • Loading branch information
rtobar committed Jul 4, 2023
1 parent 68d614a commit d845e2d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 22 deletions.
22 changes: 5 additions & 17 deletions .github/workflows/build-and-test-ngas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,18 @@ jobs:
strategy:
matrix:
include:
- python: 2.7
- python: 3.5
test_number: 1
- python: 2.7
- python: 3.6
db: mysql
test_number: 2
- python: 2.7
- python: 3.7
db: postgresql
test_number: 3
- python: 3.5
test_number: 4
- python: 3.6
test_number: 5
- python: 3.7
test_number: 6
- python: 3.8
test_number: 7
test_number: 4
- python: 3.9
test_number: 8
test_number: 5
runs-on: ubuntu-20.04

steps:
Expand All @@ -63,12 +57,6 @@ jobs:
env:
DB: ${{ matrix.db }}

- name: Setup python 3 for coverage data upload
if: matrix.python == 2.7
uses: actions/setup-python@v4
with:
python-version: 3.7

- name: Install coveralls
run: pip install 'coverage<5' coveralls

Expand Down
5 changes: 1 addition & 4 deletions .travis/run_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,7 @@ if [[ "$DB" == "mysql" ]]; then
|| fail "$ECREAT"

# Python packages needed
PIP_PACKAGES+=" MySQL-python"

# Needed to compile MySQL-python under python2 in Ubuntu focal
sudo wget https://raw.githubusercontent.com/paulfitz/mysql-connector-c/master/include/my_config.h -O /usr/include/mysql/my_config.h
PIP_PACKAGES+=" mysqlclient"

elif [[ "$DB" == "postgresql" ]]; then

Expand Down
2 changes: 1 addition & 1 deletion .travis/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ coverage report
# sqlite3 is the default so it needs no special attention
NGAS_TESTDB=
if [[ "$DB" == "mysql" ]]; then
NGAS_TESTDB='<Db Id="blah" Snapshot="0" Interface="MySQLdb" host="127.0.0.1" db="ngas" user="ngas" passwd="ngas"/>'
NGAS_TESTDB='<Db Id="blah" Snapshot="0" Interface="MySQLdb" host="127.0.0.1" database="ngas" user="ngas" password="ngas"/>'
elif [[ "$DB" == "postgresql" ]]; then
NGAS_TESTDB='<Db Id="blah" Snapshot="0" Interface="psycopg2" host="127.0.0.1" dbname="ngas" user="ngas" password="ngas"/>'
fi
Expand Down

0 comments on commit d845e2d

Please sign in to comment.