diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..963f4c7 --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,61 @@ +name: CI + +on: [push] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + - name: Run flake8 + uses: py-actions/flake8@v2 + with: + path: flask_apispec + + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.6", "3.7", "3.8", "3.9"] + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + pip install -r dev-requirements.txt + pip install . + - name: Run tests + run: | + pytest --cov flask_apispec --cov-report xml + - name: Coverage report + uses: codecov/codecov-action@v2 + with: + files: ./coverage.xml + + build-n-publish: + name: Build and publish Python 🐍 distributions 📦 to PyPI + runs-on: ubuntu-latest + needs: [test] + steps: + - uses: actions/checkout@master + - name: Set up Python 3.9 + uses: actions/setup-python@v3 + with: + python-version: "3.9" + - name: Install dependencies + run: | + pip install setuptools wheel invoke + - name: Build a binary wheel and a source tarball + run: | + invoke install + python setup.py sdist bdist_wheel + - name: Publish distribution 📦 to PyPI + if: startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e87c1e3..0000000 --- a/.travis.yml +++ /dev/null @@ -1,43 +0,0 @@ -language: python -cache: pip -sudo: false -env: -- MARSHMALLOW_VERSION="==3.0.0" -- MARSHMALLOW_VERSION="" -python: -- '3.6' -- '3.8' -before_install: -- travis_retry pip install codecov -install: -- travis_retry pip install -U . -- travis_retry pip install -U -r dev-requirements.txt -- travis_retry pip install -U --pre marshmallow"$MARSHMALLOW_VERSION" -before_script: -- flake8 flask_apispec -script: py.test -after_success: codecov -jobs: - include: - - stage: PyPI Release - if: tag IS present - python: "3.8" - env: [] - # Override install, and script to no-ops - before_install: true - install: - - travis_retry pip install -U . - - travis_retry pip install -r dev-requirements.txt - before_script: true - script: echo "Releasing to PyPI..." - after_success: true - before_deploy: invoke install - deploy: - provider: pypi - user: sloria - password: - secure: ONHrjS08OGOhuM9hANqwVa5UP0cqQSshLOyIadP/a6zE7N3FivzDUVKUmf1fjTWgSeorBLHLb8dWGcMvQrzfdzp965OLynCKHXrZ/3IcjKyUGNazNbfQExPmMc5znx4ZkKPSnC+15JWcHATwup1RwHOVrJ7jXr7agJEmciIUS00A9+SYxlDHMUyXBs9EaSIIr2su4H/+IfdRKwEXRcw6XIE7fY2FjiMT5mDlA76pwNHuFJEU7d0JAUtV7O97G+xoOvzLoVXztlnIoiBmMAAqrGl3RzzglmR/O9Oi1bR6mulDkb/0Ew50RqEOwkHZRsvURZp7o2PNBtfO6Msy4kBs5UaUAA+DtF02WrfBdcZ36H8HPdxlPo+ua1itroRx3jTV8q5vdIlwvN0E7SYO71mxyOP8qO0dpRSx7in/29vFvU30P+al2qVfODSKXk4Pu0xOWYAG6e3bxDsAHq61TSaBAP2ovp3C3CrW+00ilssPvdDjhMmeoESjn7rBNk4O97Il02jsu+HoCzkzs0QcWIKbEmGPpq+nf5LQjsA4Y3EHDmrZHPxY/V/AXq83WPrn0w4oSzqOK3kFAjmjavSnnSpX43h0ss05XwTL6z4RDTrZjIJiZoMgZU+XsDqDwqe1XKysU9JP4iRVAUeJV6YGYfCRM8yocKlNaYlG6GScvz6Yg7o= - on: - tags: true - distributions: "sdist bdist_wheel" - skip_cleanup: true