diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml new file mode 100644 index 000000000..2e8b34687 --- /dev/null +++ b/.github/workflows/test-build.yml @@ -0,0 +1,63 @@ +name: wb_ci_testing + +on: [push, pull_request, workflow_dispatch] + +jobs: + + build: + runs-on: ubuntu-20.04 + env: + GHA_DISTRO: ubuntu-20.04 + if: "!contains(github.event.head_commit.message, 'skip ci')" + strategy: + matrix: + python-version: [3.6] + steps: + - name: Git checkout + uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Cache Build Requirements + id: pip-cache-step + uses: actions/cache@v2 + with: + path: ${{ env.pythonLocation }} + key: ${{ env.GHA_DISTRO }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt', 'dev-requirements.txt') }} + - name: install dependencies + if: steps.pip-cache-step.outputs.cache-hit != 'true' + run: | + python -m pip install --upgrade pip==18.1 + pip install -r dev-requirements.txt + + runtests: + name: Run unit tests + needs: build + runs-on: ubuntu-20.04 + env: + GHA_DISTRO: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.6 + uses: actions/setup-python@v2 + with: + python-version: 3.6 + - name: Cache pip + uses: actions/cache@v2 + with: + path: ${{ env.pythonLocation }} + key: ${{ env.GHA_DISTRO }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt', 'dev-requirements.txt') }} + - name: run syntax checks + run: | + flake8 . + - name: build plugins + run: | + python setup.py develop + - name: run unit tests + run: | + py.test --cov-report term-missing --cov waterbutler tests + - name: Upload coverage data to coveralls.io + run: coveralls --service=github + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 04f136e06..000000000 --- a/.travis.yml +++ /dev/null @@ -1,39 +0,0 @@ -language: python - -python: - - "3.6" - -sudo: false - -cache: - directories: - - $HOME/wheelhouse - -before_install: - - export WHEELHOUSE=$HOME/wheelhouse - -install: - - travis_retry pip install -U pip==18.1 - - travis_retry pip install setuptools==37.0.0 - - travis_retry pip install wheel==0.26.0 - - travis_retry pip install invoke==0.13.0 - - travis_retry invoke wheelhouse --develop - - travis_retry invoke install --develop - -env: - - WATERBUTLER_CONFIG=./travis-config.json BOTO_CONFIG=/dev/null - -script: - - invoke test - -before_cache: - # force reinstall for reqs pulled from github repos - - rm -f $HOME/wheelhouse/boto-*.whl - - rm -f $HOME/wheelhouse/aiohttpretty-*.whl - - -notifications: - flowdock: 9f8a6baf3feafdb62e515718698d06d0 - -after_success: - coveralls diff --git a/README.md b/README.md index c4d4a0eef..0679f2364 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,10 @@ [![Documentation Status](https://readthedocs.org/projects/waterbutler/badge/?version=latest)](http://waterbutler.readthedocs.org/en/latest/?badge=latest) [![Code Climate](https://codeclimate.com/github/CenterForOpenScience/waterbutler/badges/gpa.svg)](https://codeclimate.com/github/CenterForOpenScience/waterbutler) -[![Coverage Status](https://coveralls.io/repos/github/CenterForOpenScience/waterbutler/badge.svg)](https://coveralls.io/github/CenterForOpenScience/waterbutler) -`master` Build Status: [![Build Status](https://travis-ci.org/CenterForOpenScience/waterbutler.svg?branch=master)](https://travis-ci.org/CenterForOpenScience/waterbutler) +`master` Build Status: [![Build Status](https://github.com/CenterForOpenScience/waterbutler/actions/workflows/test-build.yml/badge.svg?branch=master)](https://github.com/CenterForOpenScience/waterbutler/actions)[![Coverage Status](https://coveralls.io/repos/github/CenterForOpenScience/waterbutler/badge.svg?branch=master)](https://coveralls.io/github/CenterForOpenScience/waterbutler?branch=master) -`develop` Build Status: [![Build Status](https://travis-ci.org/CenterForOpenScience/waterbutler.svg?branch=develop)](https://travis-ci.org/CenterForOpenScience/waterbutler) +`develop` Build Status: [![Build Status](https://github.com/CenterForOpenScience/waterbutler/actions/workflows/test-build.yml/badge.svg?branch=develop)](https://github.com/CenterForOpenScience/waterbutler/actions)[![Coverage Status](https://coveralls.io/repos/github/CenterForOpenScience/waterbutler/badge.svg?branch=develop)](https://coveralls.io/github/CenterForOpenScience/waterbutler?branch=develop) ### Compatibility diff --git a/dev-requirements.txt b/dev-requirements.txt index 22e5836ba..fb98067d5 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -2,6 +2,7 @@ git+https://github.com/CenterForOpenScience/aiohttpretty.git@develop colorlog==2.5.0 +coveralls flake8==3.5.0 ipdb==0.12.2 ipython==7.8.0 @@ -13,4 +14,3 @@ pyflakes==1.6.0 pytest==5.2.1 pytest-asyncio==0.10.0 pytest-cov==2.8.1 -python-coveralls==2.9.3 diff --git a/travis-config.json b/travis-config.json deleted file mode 100644 index 06c307b54..000000000 --- a/travis-config.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "OSFSTORAGE_PROVIDER_CONFIG": { - "HMAC_SECRET": "travis" - }, - "SERVER_CONFIG": { - "HMAC_SECRET": "travis" - } -}