Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno Alla committed Nov 11, 2020
0 parents commit d7f1c4e
Show file tree
Hide file tree
Showing 28 changed files with 1,724 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"projectName": "netlify-builds",
"projectOwner": "browniebroke",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"imageSize": 80,
"commit": true,
"commitConvention": "none",
"contributors": [],
"contributorsPerLine": 7,
"skipCi": true
}
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# http://editorconfig.org

root = true

[*]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true
charset = utf-8
end_of_line = lf

[*.bat]
indent_style = tab
end_of_line = crlf

[LICENSE]
insert_final_newline = false

[Makefile]
indent_style = tab
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
exclude = docs
max-line-length = 88
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Bug report
about: Create a report to help us improve
labels: bug
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

**Additional context**
Add any other context about the problem here.
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/2-feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Feature request
about: Suggest an idea for this project
labels: enhancement
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Additional context**
Add any other context or screenshots about the feature request here.
84 changes: 84 additions & 0 deletions .github/labels.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
[breaking]
color = "ffcc00"
name = "breaking"
description = "Breaking change."

[bug]
color = "d73a4a"
name = "bug"
description = "Something isn't working"

[dependencies]
color = "0366d6"
name = "dependencies"
description = "Pull requests that update a dependency file"

[github_actions]
color = "000000"
name = "github_actions"
description = "Update of github actions"

[documentation]
color = "1bc4a5"
name = "documentation"
description = "Improvements or additions to documentation"

[duplicate]
color = "cfd3d7"
name = "duplicate"
description = "This issue or pull request already exists"

[enhancement]
color = "a2eeef"
name = "enhancement"
description = "New feature or request"

["good first issue"]
color = "7057ff"
name = "good first issue"
description = "Good for newcomers"

["help wanted"]
color = "008672"
name = "help wanted"
description = "Extra attention is needed"

[invalid]
color = "e4e669"
name = "invalid"
description = "This doesn't seem right"

[nochangelog]
color = "555555"
name = "nochangelog"
description = "Exclude pull requests from changelog"

[question]
color = "d876e3"
name = "question"
description = "Further information is requested"

[removed]
color = "e99695"
name = "removed"
description = "Removed piece of functionalities."

[tests]
color = "bfd4f2"
name = "tests"
description = "CI, CD and testing related changes"

[wontfix]
color = "ffffff"
name = "wontfix"
description = "This will not be worked on"

[discussion]
color = "c2e0c6"
name = "discussion"
description = "Some discussion around the project"

[hacktoberfest]
color = "ffa663"
name = "hacktoberfest"
description = "Good issues for Hacktoberfest"
73 changes: 73 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: CI

on:
push:
branches:
- main
pull_request:

jobs:
lint:
strategy:
matrix:
linter:
- name: Flake8
run: flake8
- name: Black
run: black --check .
- name: PyUpgrade
run: pyupgrade --py36-plus `find . -name "*.py"`
- name: isort
run: isort -c -v .
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: abatilo/actions-poetry@v2.1.0
- name: Install Dependencies
run: poetry install
- name: ${{ matrix.linter.name }}
run: poetry run ${{ matrix.linter.run }}

# Make sure commit messages follow the conventional commits convention:
# https://www.conventionalcommits.org
commitlint:
name: Lint Commit Messages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v2.1.0

test:
strategy:
matrix:
python-version:
- 3.6
- 3.7
- 3.8
- 3.9
os:
- ubuntu-latest
- windows-latest
- macOS-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: abatilo/actions-poetry@v2.1.0
- name: Install Dependencies
run: poetry install
- name: Test with Pytest
run: poetry run pytest --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/hacktoberfest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Hacktoberfest

on:
schedule:
- cron: "0 0 * 10 *"
workflow_dispatch:
inputs:
revert:
description: 'If true label will be removed'
required: true
default: '0'

jobs:
example:
runs-on: ubuntu-latest

steps:
- uses: browniebroke/hacktoberfest-labeler-action@v1.1.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
revert: ${{ github.event.inputs.revert }}
22 changes: 22 additions & 0 deletions .github/workflows/issue-manager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Automatically close issues that have a keyword mark (an HTML comment)
# in the last comment in the issue, by a group of predefined users, after a custom delay.
# https://github.com/tiangolo/issue-manager
#
# Default to 10 days delay and comment:
# <!-- issue-manager: answered -->


name: Issue Manager

on:
schedule:
- cron: "0 0 * * *"

jobs:
issue-manager:
runs-on: ubuntu-latest
steps:
- uses: tiangolo/issue-manager@0.3.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
config: '{"answered": {}}'
22 changes: 22 additions & 0 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Sync Github labels

on:
push:
branches:
- main
paths:
- '.github/**'

jobs:
labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install labels
run: pip install labels
- name: Sync config with Github
run: labels -u ${{ github.repository_owner }} -t ${{ secrets.GITHUB_TOKEN }} sync -f .github/labels.toml
40 changes: 40 additions & 0 deletions .github/workflows/pre-commit-autoupdate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Run pre-commit autoupdate every day at midnight
# and create a pull request if any changes


name: Pre-commit auto-update

on:
schedule:
- cron: "0 0 * * *"

jobs:
auto-update:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install pre-commit
run: pip install pre-commit

- name: Run pre-commit autoupdate
run: pre-commit autoupdate

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3.4.1
with:
# CI won't be running on pull requests by default
token: ${{ secrets.GITHUB_TOKEN }}
# Change to a personal access token with the 'repo' scope
# and save it as CPR_GITHUB_TOKEN to get it to work
# https://github.com/settings/tokens/new?scopes=repo
# token: ${{ secrets.CPR_GITHUB_TOKEN }}
branch: update/pre-commit-autoupdate
title: Auto-update pre-commit hooks
commit-message: Auto-update pre-commit hooks
body: Update versions of tools in pre-commit configs to latest version
labels: dependencies
25 changes: 25 additions & 0 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Semantic Release

on:
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

# Run semantic release:
# - Update CHANGELOG.md
# - Update version in code
# - Create git tag
# - Create Github release
# - Publish to PyPI
- name: Python Semantic Release
uses: relekang/python-semantic-release@v7.3.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
pypi_token: ${{ secrets.PYPI_TOKEN }}

0 comments on commit d7f1c4e

Please sign in to comment.