chore: initial commit
This commit is contained in:
88
.github/workflows/ci.yml
vendored
Normal file
88
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: "3.9"
|
||||
- uses: pre-commit/action@v2.0.3
|
||||
|
||||
# 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@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: wagoid/commitlint-github-action@v4.1.11
|
||||
|
||||
test:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version:
|
||||
- "3.7"
|
||||
- "3.8"
|
||||
- "3.9"
|
||||
- "3.10"
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
- macOS-latest
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- uses: snok/install-poetry@v1
|
||||
- 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@v3
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
environment: release
|
||||
if: github.ref == 'refs/heads/main'
|
||||
needs:
|
||||
- test
|
||||
- lint
|
||||
- commitlint
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
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.27.1
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
pypi_token: ${{ secrets.PYPI_TOKEN }}
|
||||
17
.github/workflows/hacktoberfest.yml
vendored
Normal file
17
.github/workflows/hacktoberfest.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
name: Hacktoberfest
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Run every day in October
|
||||
- cron: "0 0 * 10 *"
|
||||
# Run on the 1st of November to revert
|
||||
- cron: "0 13 1 11 *"
|
||||
|
||||
jobs:
|
||||
hacktoberfest:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: browniebroke/hacktoberfest-labeler-action@v2.2.0
|
||||
with:
|
||||
github_token: ${{ secrets.GH_PAT }}
|
||||
32
.github/workflows/issue-manager.yml
vendored
Normal file
32
.github/workflows/issue-manager.yml
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
name: Issue Manager
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
issue_comment:
|
||||
types:
|
||||
- created
|
||||
issues:
|
||||
types:
|
||||
- labeled
|
||||
pull_request_target:
|
||||
types:
|
||||
- labeled
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
issue-manager:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: tiangolo/issue-manager@0.4.0
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
config: >
|
||||
{
|
||||
"answered": {
|
||||
"message": "Assuming the original issue was solved, it will be automatically closed now."
|
||||
},
|
||||
"waiting": {
|
||||
"message": "Automatically closing. To re-open, please provide the additional information requested."
|
||||
}
|
||||
}
|
||||
22
.github/workflows/labels.yml
vendored
Normal file
22
.github/workflows/labels.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: Sync Github labels
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- ".github/**"
|
||||
|
||||
jobs:
|
||||
labels:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v3
|
||||
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
|
||||
Reference in New Issue
Block a user