Skip to content

Commit

Permalink
Merge pull request #2 from christokur/main
Browse files Browse the repository at this point in the history
Sync with released cookiecutter
  • Loading branch information
dldinternet committed Feb 3, 2023
2 parents d2c139d + c83bffc commit 98a986d
Show file tree
Hide file tree
Showing 145 changed files with 2,451 additions and 1,714 deletions.
41 changes: 40 additions & 1 deletion .github/release-drafter.yml
@@ -1,5 +1,42 @@
filter-by-commitish: true
commitish: master
name-template: '$RESOLVED_VERSION'
tag-template: '$RESOLVED_VERSION'
version-resolver:
major:
labels:
- 'breaking-change'
- 'major'
minor:
labels:
- 'enhancement'
- 'feature'
patch:
labels:
- 'bug'
- 'CI/CD'
- 'code style'
- 'documentation'
- 'tests'
- 'patch'
default: patch
autolabeler:
- label: 'CI/CD'
files:
- '.github/*'
- '.pre-commit-config.yaml'
- '*.cfg'
- '*.ini'
- 'noxfile.py'
- 'setup.*'
- 'docs/conf.py'
- 'Makefile'
- 'make.bat'
- '*requirements*.txt'
- label: 'documentation'
files:
- '*.md'
- '*.rst'
categories:
- title: 'Breaking Changes'
labels:
Expand All @@ -25,13 +62,15 @@ categories:
- title: 'Deprecations'
labels:
- 'deprecated'
sort-by: title
sort-direction: ascending
exclude-labels:
- 'skip-changelog'
template: |
## Changes
$CHANGES
## This release is made by wonderfull contributors:
## This release is made by wonderful contributors:
$CONTRIBUTORS
26 changes: 0 additions & 26 deletions .github/workflows/docs.yml

This file was deleted.

Expand Up @@ -4,9 +4,18 @@ on:
push:
branches:
- master
# autolabeler
pull_request:
types:
- opened
- reopened
- synchronize

jobs:
update_release_draft:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
Expand Down
125 changes: 0 additions & 125 deletions .github/workflows/main.yml

This file was deleted.

46 changes: 32 additions & 14 deletions .github/workflows/pip-publish.yml
Expand Up @@ -7,20 +7,38 @@ on:
jobs:
upload:
runs-on: ubuntu-latest

environment:
name: pypi.org
url: https://pypi.org/project/cookiecutter/

steps:
- uses: actions/checkout@v2

- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v3
with:
python-version: 3.10

- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
python-version: "3.7"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel twine
- name: Package project
run: python setup.py sdist bdist_wheel
- name: Upload distributions
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: twine upload dist/*
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
86 changes: 86 additions & 0 deletions .github/workflows/tests.yml
@@ -0,0 +1,86 @@
name: CI/CD Tests

on:
push:
branches:
- master
tags:
- "*"
pull_request:
branches:
- "*"

jobs:
documentation_build_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install nox virtualenv
- name: Build docs
run: nox -s docs
- uses: actions/upload-artifact@v3
with:
name: DocumentationHTML
path: docs/_build/html/
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install nox virtualenv
- name: Lint
run: "nox -s lint"
tests_run:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
python:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install nox virtualenv
- name: Project internals test build
run: "nox -p ${{ matrix.python }} -s tests"
- name: Project security test
run: "nox -p ${{ matrix.python }} -s safety_tests"
- name: Send coverage report to codeclimate
continue-on-error: true
uses: paambaati/codeclimate-action@v3.0.0
with:
coverageCommand: echo "Ignore rerun"
coverageLocations: ${{github.workspace}}/coverage.xml:coverage.py
env:
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
- name: Send coverage report to codecov
uses: codecov/codecov-action@v3
with:
env_vars: OS=${{ matrix.os }},PYTHON=${{ matrix.python }}
file: ./coverage.xml
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -38,6 +38,7 @@ pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

0 comments on commit 98a986d

Please sign in to comment.