diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..e357c94 --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,36 @@ +name: tests +on: [push, pull_request] +jobs: + tests: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - TASK_VERSION: v2.4.0 + - TASK_VERSION: v2.4.1 + - TASK_VERSION: v2.4.2 + - TASK_VERSION: v2.4.3 + - TASK_VERSION: v2.4.4 + - TASK_VERSION: v2.5.0 + - TASK_VERSION: v2.5.1 + continue-on-error: ${{ matrix.continue-on-error == true }} + steps: + - uses: actions/checkout@v2 + - name: Prepare docker image + run: docker-compose build --build-arg TASK_VERSION=${{ matrix.TASK_VERSION }} tests + - name: Test + run: make test PYTEST_FLAGS="-n8" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COVERALLS_PARALLEL: true + + coveralls-finished: + needs: tests + runs-on: ubuntu-latest + steps: + - name: Finished + uses: coverallsapp/github-action@v1.1.1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel-finished: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2a805dd..0000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: minimal -env: - - TASK_VERSION=v2.4.0 - - TASK_VERSION=v2.4.1 - - TASK_VERSION=v2.4.2 - - TASK_VERSION=v2.4.3 - - TASK_VERSION=v2.4.4 - - TASK_VERSION=v2.5.0 - - TASK_VERSION=v2.5.1 -services: - - docker -install: - # Build the docker container - - pushd $TRAVIS_BUILD_DIR - - docker-compose build --build-arg TASK_VERSION=$TASK_VERSION tests -script: - - make test PYTEST_FLAGS="-n8" diff --git a/Makefile b/Makefile index 5ef4ccc..b51a374 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ pytest: cover-pytest: PYTEST_FLAGS += --cov=taskwiki cover-pytest: pytest - if [ "$$TRAVIS" ]; then coveralls; fi + if [ "$$GITHUB_ACTIONS" ]; then coveralls || :; fi xvfb-%: xvfb-run --server-args=-noreset $(MAKE) $* diff --git a/README.md b/README.md index 9282502..ebf0a98 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ _Proper project management in vim. Standing on the shoulders of vimwiki and Taskwarrior_ -[![Travis build status](https://travis-ci.org/tbabej/taskwiki.svg?branch=master)](https://travis-ci.org/tbabej/taskwiki) +[![GitHub Actions build status](https://github.com/tbabej/taskwiki/workflows/tests/badge.svg?branch=master)](https://github.com/tbabej/taskwiki/actions) [![Coverage Status](https://coveralls.io/repos/tbabej/taskwiki/badge.svg?branch=master)](https://coveralls.io/r/tbabej/taskwiki?branch=master) [![Code Health](https://landscape.io/github/tbabej/taskwiki/master/landscape.svg?style=flat)](https://landscape.io/github/tbabej/taskwiki/master) [![Chat with developers](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/tbabej/taskwiki) @@ -295,7 +295,7 @@ need to install and enable either the `en_US` or `en_GB` locale. For example: LANG=en_US python -m pytest -Finally you might want to have a look at [the travis configuration](.travis.yml) +Finally you might want to have a look at [the CI configuration](.github/workflows/tests.yaml) and consider using a virtual machine or [Xvfb](https://www.x.org/releases/X11R7.6/doc/man/man1/Xvfb.1.xhtml). #### Known issues diff --git a/docker-compose.yml b/docker-compose.yml index 86f3de9..91f0cf9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,8 +9,12 @@ services: - label=type:container_runtime_t tty: true environment: + COVERALLS_PARALLEL: + GITHUB_ACTIONS: + GITHUB_HEAD_REF: + GITHUB_REF: + GITHUB_RUN_ID: + GITHUB_RUN_NUMBER: + GITHUB_SHA: + GITHUB_TOKEN: PYTEST_FLAGS: "-o cache_dir=/tmp/pytest-cache ${PYTEST_FLAGS:-}" - TRAVIS: - TRAVIS_JOB_ID: - TRAVIS_BRANCH: - TRAVIS_PULL_REQUEST: