From bf59599908cc5927a966760dae6a4ce25748dee5 Mon Sep 17 00:00:00 2001 From: Laerte <5853172+Laerte@users.noreply.github.com> Date: Wed, 13 Oct 2021 19:06:43 -0300 Subject: [PATCH 1/8] Add Github Actions --- .github/workflows/main.yml | 28 +++++++++++++++++++ .../splash/install-python-splash-deps.sh | 2 +- dockerfiles/tests/runtests.sh | 2 +- 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..14ceb3f15 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,28 @@ +name: CI +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - + name: Checkout + uses: actions/checkout@v2.3.4 + - + name: Build base image + uses: docker/build-push-action@v2.7.0 + with: + context: . + tags: splash + - + name: Build tests image + uses: docker/build-push-action@v2.7.0 + with: + context: dockerfiles/tests + tags: splash-tests + - + name: Run tests and Codecov + shell: 'script --return --quiet --command "bash {0}"' + run: | + docker run --env CI='true' -it splash-tests diff --git a/dockerfiles/splash/install-python-splash-deps.sh b/dockerfiles/splash/install-python-splash-deps.sh index bfbb4f62c..8e92c9aa9 100755 --- a/dockerfiles/splash/install-python-splash-deps.sh +++ b/dockerfiles/splash/install-python-splash-deps.sh @@ -3,7 +3,7 @@ _PYTHON=python3 install_python_deps () { # Install python-level dependencies. - ${_PYTHON} -m pip install -U pip setuptools six && \ + ${_PYTHON} -m pip install -U pip setuptools==57.5.0 six && \ ${_PYTHON} -m pip install \ qt5reactor==0.5 \ psutil==5.0.0 \ diff --git a/dockerfiles/tests/runtests.sh b/dockerfiles/tests/runtests.sh index 98323c253..7c998ee5d 100755 --- a/dockerfiles/tests/runtests.sh +++ b/dockerfiles/tests/runtests.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash py.test --cov=splash --doctest-modules --durations=50 "$@" && \ -if [ -n "${TRAVIS}" ]; then +if [ -n "${CI}" ]; then codecov fi; \ No newline at end of file From a9e4ba158eafd4d13ee987f9cc85e4a510e15c33 Mon Sep 17 00:00:00 2001 From: Laerte <5853172+Laerte@users.noreply.github.com> Date: Wed, 13 Oct 2021 19:35:01 -0300 Subject: [PATCH 2/8] Pass env value --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 14ceb3f15..0334409cb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,4 +25,4 @@ jobs: name: Run tests and Codecov shell: 'script --return --quiet --command "bash {0}"' run: | - docker run --env CI='true' -it splash-tests + docker run --env CI=${CI} -it splash-tests From f9c629975ffad4e0410a5964538c2e317b8d8cba Mon Sep 17 00:00:00 2001 From: Laerte <5853172+Laerte@users.noreply.github.com> Date: Thu, 14 Oct 2021 08:41:17 -0300 Subject: [PATCH 3/8] Pass .git folder via volume --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0334409cb..095987ab0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,4 +25,4 @@ jobs: name: Run tests and Codecov shell: 'script --return --quiet --command "bash {0}"' run: | - docker run --env CI=${CI} -it splash-tests + docker run -v $(pwd)/.git:/app/.git --env CI=${CI} -it splash-tests From 796e44d7588b569c1526a97490b111b1ca2dca8a Mon Sep 17 00:00:00 2001 From: Laerte <5853172+Laerte@users.noreply.github.com> Date: Thu, 27 Jan 2022 23:31:22 -0300 Subject: [PATCH 4/8] Remove codecov step --- .github/workflows/main.yml | 5 ++--- dockerfiles/tests/runtests.sh | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 095987ab0..74e1b2a63 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,6 @@ jobs: context: dockerfiles/tests tags: splash-tests - - name: Run tests and Codecov + name: Run tests shell: 'script --return --quiet --command "bash {0}"' - run: | - docker run -v $(pwd)/.git:/app/.git --env CI=${CI} -it splash-tests + run: docker run -it splash-tests diff --git a/dockerfiles/tests/runtests.sh b/dockerfiles/tests/runtests.sh index 7c998ee5d..874c318c0 100755 --- a/dockerfiles/tests/runtests.sh +++ b/dockerfiles/tests/runtests.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash py.test --cov=splash --doctest-modules --durations=50 "$@" && \ -if [ -n "${CI}" ]; then - codecov -fi; \ No newline at end of file +#if [ -n "${CI}" ]; then +# codecov +#fi; \ No newline at end of file From a69f55be086359fa4787c84cdd43e535843b7d36 Mon Sep 17 00:00:00 2001 From: Laerte <5853172+Laerte@users.noreply.github.com> Date: Thu, 27 Jan 2022 23:53:30 -0300 Subject: [PATCH 5/8] Fix yaml --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 74e1b2a63..597ec35dd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,4 +24,5 @@ jobs: - name: Run tests shell: 'script --return --quiet --command "bash {0}"' - run: docker run -it splash-tests + run: | + docker run -it splash-tests From c53f42d058245d8dc30e8c8f3576b12c3cb32432 Mon Sep 17 00:00:00 2001 From: Laerte <5853172+Laerte@users.noreply.github.com> Date: Fri, 28 Jan 2022 00:05:08 -0300 Subject: [PATCH 6/8] Remove hack --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 597ec35dd..7a5110a6d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,6 +23,5 @@ jobs: tags: splash-tests - name: Run tests - shell: 'script --return --quiet --command "bash {0}"' run: | docker run -it splash-tests From f5ebc2696b493efc55d0e42d532db8feede69e9c Mon Sep 17 00:00:00 2001 From: Laerte <5853172+Laerte@users.noreply.github.com> Date: Fri, 28 Jan 2022 00:20:43 -0300 Subject: [PATCH 7/8] Update main.yml --- .github/workflows/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7a5110a6d..eda8776c0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,5 +23,6 @@ jobs: tags: splash-tests - name: Run tests - run: | + shell: 'script --return --quiet --command "bash {0}"' + run: | docker run -it splash-tests From a4bc17aafc828172c2132e98bf5ecc713dec6d85 Mon Sep 17 00:00:00 2001 From: Laerte <5853172+Laerte@users.noreply.github.com> Date: Fri, 28 Jan 2022 00:31:26 -0300 Subject: [PATCH 8/8] Update runtests.sh --- dockerfiles/tests/runtests.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dockerfiles/tests/runtests.sh b/dockerfiles/tests/runtests.sh index 874c318c0..b042a4073 100755 --- a/dockerfiles/tests/runtests.sh +++ b/dockerfiles/tests/runtests.sh @@ -1,5 +1,2 @@ #!/usr/bin/env bash -py.test --cov=splash --doctest-modules --durations=50 "$@" && \ -#if [ -n "${CI}" ]; then -# codecov -#fi; \ No newline at end of file +py.test --cov=splash --doctest-modules --durations=50 "$@"