Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV 2469 fix github action #286

Draft
wants to merge 16 commits into
base: develop
Choose a base branch
from
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- develop
- release/**
- hotfix/**
- feat/dev-583-remove-set-env-in-github-actions
- feat/dev-2469-fix-github-action
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this just for testing? Do we plan to remove this before merging?

tags:
- "*"

Expand Down
9 changes: 7 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@ include:
- templates/common/python.yaml

tox:
variables:
BASE_CONTAINER_VERSION: 1.2.0
parallel:
matrix:
- BUILD_PY_VERSION:
- python3.6
- python3.7
- python35
- python36
- python37
script:
# for python3.5 apt install libffi-dev
- apt-get update && apt-get install libffi-dev
- tox -r -e py


Expand Down
32 changes: 8 additions & 24 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,8 @@
language: generic

sudo: false

before_install:
- unset PYENV_ROOT
- rm -rf ~/.pyenv
- curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
- export PATH="$HOME/.pyenv/bin:$PATH"

install:
- virtualenv venv
- source venv/bin/activate
- pip install tox-travis tox-pyenv
- pyenv install 3.5.7
- pyenv install 3.6.9
- pyenv install 3.7.5

script:
- pyenv local 3.5.7 3.6.9 3.7.5
- tox -e py35,py36,py37

after_script:
- tox -e coverage
language: python
python:
- "3.5"
- "3.6"
- "3.7"

install: pip install tox-travis
script: tox
11 changes: 6 additions & 5 deletions bin/package
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

set -e
set -euox pipefail

function cleanup() {
# get rid of the virtualenv
Expand Down Expand Up @@ -69,16 +69,16 @@ esac
# setup.py is in previous dir
cd ..

python -m pip install -r requirements.txt
python setup.py install
python -m pip install --no-deps -r requirements.txt
python -m pip install --no-deps .

# go back go the ./gdc_client/bin dir
cd bin

echo "Building for ${TARGET_ENVIRONMENT}..."

# Make sure the correct version of pyinstaller and setuptools are installed
pip install -U "PyInstaller==3.5"
pip install -U "PyInstaller>=4.10"

# Ran into ModuleNotFoundError: No module named 'pkg_resources.py2_warn' with higher versions of setuptools
pip install --upgrade 'setuptools<45.0.0'
Expand All @@ -96,6 +96,7 @@ pyinstaller \
--additional-hooks-dir=. \
--noconfirm \
--onefile \
--copy-metadata gdc-client \
-c gdc-client

echo "Testing produced binary..."
Expand All @@ -106,7 +107,7 @@ echo "Zipping binary..."
cd dist

PRE_ZIP_NAME="gdc-client_${VERSION}_${TARGET_ENVIRONMENT}_x64"
if [ -n "${DATE}" ]; then
if [ -n "${DATE+x}" ]; then
PRE_ZIP_NAME="gdc-client_${VERSION}_${DATE}_${TARGET_ENVIRONMENT}_x64"
fi

Expand Down
21 changes: 10 additions & 11 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile
# This file is autogenerated by pip-compile with python 3.6
# To update, run:
#
# pip-compile dev-requirements.in
Expand All @@ -14,12 +14,12 @@ aws-sam-translator==1.11.0
# cfn-lint
aws-xray-sdk==2.11.0
# via moto
boto==2.49.0
# via moto
boto3==1.16.63
# via
# aws-sam-translator
# moto
boto==2.49.0
# via moto
botocore==1.19.63
# via
# aws-xray-sdk
Expand Down Expand Up @@ -68,8 +68,9 @@ idna==2.8
# -c requirements.txt
# moto
# requests
importlib-metadata==2.1.3
importlib-metadata==2.1.3 ; python_version < "3.8"
# via
# -c requirements.txt
# pluggy
# pytest
itsdangerous==1.1.0
Expand Down Expand Up @@ -107,8 +108,6 @@ moto==1.3.16
# via -r dev-requirements.in
packaging==20.9
# via pytest
pathlib2==2.3.7.post1
# via pytest
pluggy==0.13.1
# via pytest
py==1.11.0
Expand All @@ -124,12 +123,12 @@ pycparser==2.21
# cffi
pyparsing==2.4.7
# via packaging
pytest-cov==2.7.1
# via -r dev-requirements.in
pytest==4.6.2
# via
# -r dev-requirements.in
# pytest-cov
pytest-cov==2.7.1
# via -r dev-requirements.in
python-dateutil==2.8.2
# via
# botocore
Expand All @@ -145,8 +144,6 @@ pyyaml==5.3.1
# -c requirements.txt
# cfn-lint
# moto
requests-mock==1.5.2
# via -r dev-requirements.in
requests==2.22.0
# via
# -c requirements.txt
Expand All @@ -156,6 +153,8 @@ requests==2.22.0
# moto
# requests-mock
# responses
requests-mock==1.5.2
# via -r dev-requirements.in
responses==0.17.0
# via moto
rsa==4.7.2
Expand All @@ -172,7 +171,6 @@ six==1.16.0
# ecdsa
# mock
# moto
# pathlib2
# pytest
# python-dateutil
# python-jose
Expand Down Expand Up @@ -201,6 +199,7 @@ xmltodict==0.13.0
# via moto
zipp==1.2.0
# via
# -c requirements.txt
# importlib-metadata
# moto

Expand Down
30 changes: 18 additions & 12 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile
# This file is autogenerated by pip-compile with python 3.6
# To update, run:
#
# pip-compile
Expand All @@ -12,36 +12,38 @@ chardet==3.0.4
# via requests
cryptography==2.8
# via
# gdc_client (setup.py)
# gdc-client (setup.py)
# pyopenssl
idna==2.8
# via requests
importlib-metadata==2.1.3 ; python_version < "3.8"
# via gdc-client (setup.py)
intervaltree==3.0.2
# via gdc_client (setup.py)
# via gdc-client (setup.py)
jsonschema==2.6.0
# via gdc_client (setup.py)
# via gdc-client (setup.py)
lxml==4.4.2
# via gdc_client (setup.py)
# via gdc-client (setup.py)
ndg-httpsclient==0.5.0
# via gdc_client (setup.py)
# via gdc-client (setup.py)
progressbar2==3.43.1
# via gdc_client (setup.py)
# via gdc-client (setup.py)
pyasn1==0.4.3
# via
# gdc_client (setup.py)
# gdc-client (setup.py)
# ndg-httpsclient
pycparser==2.21
# via cffi
pyopenssl==18.0.0
# via
# gdc_client (setup.py)
# gdc-client (setup.py)
# ndg-httpsclient
python-utils==2.7.1
# via progressbar2
pyyaml==5.3.1
# via gdc_client (setup.py)
# via gdc-client (setup.py)
requests==2.22.0
# via gdc_client (setup.py)
# via gdc-client (setup.py)
six==1.16.0
# via
# cryptography
Expand All @@ -51,6 +53,10 @@ six==1.16.0
sortedcontainers==2.4.0
# via intervaltree
termcolor==1.1.0
# via gdc_client (setup.py)
# via gdc-client (setup.py)
urllib3==1.25.11
# via requests
zipp==1.2.0
# via
# gdc-client (setup.py)
# importlib-metadata
12 changes: 11 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@
use_scm_version={
"local_scheme": "dirty-tag",
},
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
],
python_requires=">=3.5",
setup_requires=["setuptools_scm<6"],
packages=find_packages(),
package_data={},
Expand All @@ -18,9 +27,10 @@
"pyOpenSSL~=18.0.0",
"PyYAML>=5.1",
"intervaltree~=3.0.2",
"importlib_metadata; python_version<'3.8'",
"importlib_metadata<=2.1.3; python_version<'3.8'", # 2.1.3 last support for py35
"termcolor~=1.1.0",
"requests~=2.22.0",
"progressbar2~=3.43.1",
"zipp<2", # zipp < 2 for python3.5
],
)
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist=py35,py36
envlist=py35,py36,py37

[testenv]
setenv=
Expand Down
Loading