diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 730d33584..a0f262771 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -76,3 +76,22 @@ jobs: - name: clippy run: cargo clippy --all + + python_tests: + name: 3.7 python tests sample + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + components: rustfmt + + - name: Setup python + uses: actions/setup-python@v1 + with: + python-version: 3.x + architecture: x64 + - run: bash ci_scripts/run-python.sh diff --git a/ci_scripts/run-python.sh b/ci_scripts/run-python.sh index d431507e0..7b295fe8f 100755 --- a/ci_scripts/run-python.sh +++ b/ci_scripts/run-python.sh @@ -13,7 +13,6 @@ export TOXWORKDIR=.docker-tox export PATH=/root/.cargo/bin:$PATH cargo build --release -p deltachat_ffi -# cargo test --all --all-features # Statically link against libdeltachat.a. export DCC_RS_DEV=$(pwd) @@ -22,36 +21,27 @@ export DCC_RS_DEV=$(pwd) # needed by tox below. export PATH=$PATH:/opt/python/cp35-cp35m/bin export PYTHONDONTWRITEBYTECODE=1 -pushd /bin -ln -s /opt/python/cp27-cp27m/bin/python2.7 -ln -s /opt/python/cp36-cp36m/bin/python3.6 -ln -s /opt/python/cp37-cp37m/bin/python3.7 + +pushd python +# prepare a clean tox run +rm -rf tests/__pycache__ +rm -rf src/deltachat/__pycache__ +export PYTHONDONTWRITEBYTECODE=1 + +# run tox. The circle-ci project env-var-setting DCC_PY_LIVECONFIG +# allows running of "liveconfig" tests but for speed reasons +# we run them only for the highest python version we support + +# we split out qr-tests run to minimize likelyness of flaky tests +# (some qr tests are pretty heavy in terms of send/received +# messages and rust's imap code likely has concurrency problems) +tox --workdir "$TOXWORKDIR" -e py37 -- --reruns 3 -k "not qr" +tox --workdir "$TOXWORKDIR" -e py37 -- --reruns 3 -k "qr" +unset DCC_PY_LIVECONFIG +#tox --workdir "$TOXWORKDIR" -p4 -e lint,py35,py36,doc +#tox --workdir "$TOXWORKDIR" -e auditwheels popd -if [ -n "$TESTS" ]; then - - pushd python - # prepare a clean tox run - rm -rf tests/__pycache__ - rm -rf src/deltachat/__pycache__ - export PYTHONDONTWRITEBYTECODE=1 - - # run tox. The circle-ci project env-var-setting DCC_PY_LIVECONFIG - # allows running of "liveconfig" tests but for speed reasons - # we run them only for the highest python version we support - - # we split out qr-tests run to minimize likelyness of flaky tests - # (some qr tests are pretty heavy in terms of send/received - # messages and rust's imap code likely has concurrency problems) - tox --workdir "$TOXWORKDIR" -e py37 -- --reruns 3 -k "not qr" - tox --workdir "$TOXWORKDIR" -e py37 -- --reruns 3 -k "qr" - unset DCC_PY_LIVECONFIG - tox --workdir "$TOXWORKDIR" -p4 -e lint,py35,py36,doc - tox --workdir "$TOXWORKDIR" -e auditwheels - popd -fi - - # if [ -n "$DOCS" ]; then # echo ----------------------- # echo generating python docs