diff --git a/.github/workflows/build-pipeline.yml b/.github/workflows/build-pipeline.yml new file mode 100644 index 000000000..a75f9f02e --- /dev/null +++ b/.github/workflows/build-pipeline.yml @@ -0,0 +1,45 @@ +# GitHub CI build pipeline +name: Cookie Cutter CI build + +on: + push: + branches: + - master + - main + pull_request: + branches: + - master + - main +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up python + uses: actions/setup-python@v3 + with: + python-version: "3.x" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install coverage + if [ -f requirements.txt ]; then pip install -r requirements_dev.txt; fi + + - name: Run Tests and generate coverage report + run: | + coverage run -m pytest + - name: Archive code coverage html report + uses: actions/upload-artifact@v2 + with: + name: code-coverage-report + path: src/htmlcov + - name: Run package creation + run: | + python -m pip install --user --upgrade build + python -m build + - name: Archive package + uses: actions/upload-artifact@v2 + with: + name: cookie-cutter + path: src/dist diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml deleted file mode 100644 index bdaab28a4..000000000 --- a/.github/workflows/python-publish.yml +++ /dev/null @@ -1,39 +0,0 @@ -# This workflow will upload a Python Package using Twine when a release is created -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries - -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -name: Upload Python Package - -on: - release: - types: [published] - -permissions: - contents: read - -jobs: - deploy: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Set up Python - uses: actions/setup-python@v3 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install build - - name: Build package - run: python -m build - - name: Publish package - uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 15777bdbb..000000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -# Config file for automatic testing at travis-ci.org - -language: python -python: - - 3.8 - - 3.7 - - 3.6 - -# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors -install: pip install -U tox-travis - -# command to run tests, e.g. python setup.py test -script: tox - -# deploy new versions to PyPI -deploy: - provider: pypi - distributions: sdist bdist_wheel - user: audreyr - password: - secure: PLEASE_REPLACE_ME - on: - tags: true - repo: audreyr/python_boilerplate - python: 3.8 diff --git a/tox.ini b/tox.ini deleted file mode 100644 index b2949261b..000000000 --- a/tox.ini +++ /dev/null @@ -1,25 +0,0 @@ -[tox] -envlist = py36, py37,py38 pypy, docs -skipsdist = true - -[travis] -python = - 3.8: py38 - 3.7: py37 - 3.6: py36 - -[testenv:docs] -basepython=python -changedir=docs -deps=sphinx -commands= - sphinx-build -b html -d {envtmpdir}/doctrees . {envtmpdir}/html - -[testenv] -setenv = - PYTHONPATH = {toxinidir} -deps = - -r{toxinidir}/requirements_dev.txt -commands = - python -m pip install --upgrade pip - pytest