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] 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