From 5203afe43a5bd3d9afd3d94bbde1c6ea38fa85e6 Mon Sep 17 00:00:00 2001 From: "Michael R. Crusoe" <1330696+mr-c@users.noreply.github.com> Date: Tue, 2 Aug 2022 14:59:26 +0200 Subject: [PATCH] include ruamel.yaml in the mypy reqs & fix/test container build (#1701) --- .github/workflows/ci-tests.yml | 7 +++++++ build-cwltool-docker.sh | 8 +------- cwltool.Dockerfile | 3 +-- mypy-requirements.txt | 1 + 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 65724b1f8..2a934f2aa 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -177,3 +177,10 @@ jobs: env: RELEASE_SKIP: head run: ./release-test.sh + + build_test_container: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: build & test cwltool_module container + run: ./build-cwltool-docker.sh diff --git a/build-cwltool-docker.sh b/build-cwltool-docker.sh index f166b10c5..85e150a49 100755 --- a/build-cwltool-docker.sh +++ b/build-cwltool-docker.sh @@ -3,14 +3,8 @@ set -ex docker build --file=cwltool.Dockerfile --tag=quay.io/commonwl/cwltool_module --target module . docker build --file=cwltool.Dockerfile --tag=quay.io/commonwl/cwltool . -docker run -it -v /var/run/docker.sock:/var/run/docker.sock \ +docker run -t -v /var/run/docker.sock:/var/run/docker.sock \ -v /tmp:/tmp \ -v "$PWD":/tmp/cwltool \ quay.io/commonwl/cwltool_module /bin/sh -c \ "apk add gcc bash && pip install -r/tmp/cwltool/test-requirements.txt ; pytest -k 'not (test_bioconda or test_double_overwrite or test_env_filtering or test_biocontainers or test_disable_file_overwrite_without_ext or test_disable_file_creation_in_outdir_with_ext or test_write_write_conflict or test_directory_literal_with_real_inputs_inside or test_revsort_workflow or test_stdin_with_id_preset)' --ignore-glob '*test_udocker.py' -n auto -v -rs --pyargs cwltool" - -version=$(git describe --tags) -if echo "$version" | grep -vq '\-' >& /dev/null ; then - docker tag quay.io/commonwl/cwltool_module quay.io/commonwl/cwltool_module:"$version" - docker tag quay.io/commonwl/cwltool quay.io/commonwl/cwltool:"$version" -fi diff --git a/cwltool.Dockerfile b/cwltool.Dockerfile index b20243c9a..18fbc8523 100644 --- a/cwltool.Dockerfile +++ b/cwltool.Dockerfile @@ -5,8 +5,7 @@ RUN apk add --no-cache git gcc python3-dev libxml2-dev libxslt-dev libc-dev linu WORKDIR /cwltool COPY . . -RUN pip install toml -rmypy-requirements.txt "$(grep ruamel requirements.txt)" \ - "$(grep schema.salad requirements.txt)" +RUN pip install toml -rmypy-requirements.txt "$(grep schema.salad requirements.txt)" # schema-salad is needed to be installed (this time as pure Python) for # cwltool + mypyc RUN CWLTOOL_USE_MYPYC=1 MYPYPATH=mypy-stubs pip wheel --no-binary schema-salad --wheel-dir=/wheels .[deps] diff --git a/mypy-requirements.txt b/mypy-requirements.txt index ba2417a2b..db5b67f4a 100644 --- a/mypy-requirements.txt +++ b/mypy-requirements.txt @@ -1,4 +1,5 @@ mypy==0.971 +ruamel.yaml>=0.16.0,<0.17.22 types-requests types-setuptools types-psutil