Skip to content

Commit 2670a72

Browse files
committed
Add workflow files
1 parent 31a34b4 commit 2670a72

File tree

7 files changed

+229
-0
lines changed

7 files changed

+229
-0
lines changed

.github/dependabot.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
- package-ecosystem: pip
8+
directory: "/.github/workflows"
9+
schedule:
10+
interval: daily
11+
- package-ecosystem: pip
12+
directory: "/docs"
13+
schedule:
14+
interval: daily
15+
- package-ecosystem: pip
16+
directory: "/"
17+
schedule:
18+
interval: daily

.github/labels.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
# Labels names are important as they are used by Release Drafter to decide
3+
# regarding where to record them in changelog or if to skip them.
4+
#
5+
# The repository labels will be automatically configured using this file and
6+
# the GitHub Action https://github.com/marketplace/actions/github-labeler.
7+
- name: breaking
8+
description: Breaking Changes
9+
color: bfd4f2
10+
- name: bug
11+
description: Something isn't working
12+
color: d73a4a
13+
- name: build
14+
description: Build System and Dependencies
15+
color: bfdadc
16+
- name: ci
17+
description: Continuous Integration
18+
color: 4a97d6
19+
- name: dependencies
20+
description: Pull requests that update a dependency file
21+
color: 0366d6
22+
- name: documentation
23+
description: Improvements or additions to documentation
24+
color: 0075ca
25+
- name: duplicate
26+
description: This issue or pull request already exists
27+
color: cfd3d7
28+
- name: enhancement
29+
description: New feature or request
30+
color: a2eeef
31+
- name: github_actions
32+
description: Pull requests that update Github_actions code
33+
color: "000000"
34+
- name: good first issue
35+
description: Good for newcomers
36+
color: 7057ff
37+
- name: help wanted
38+
description: Extra attention is needed
39+
color: 008672
40+
- name: invalid
41+
description: This doesn't seem right
42+
color: e4e669
43+
- name: performance
44+
description: Performance
45+
color: "016175"
46+
- name: python
47+
description: Pull requests that update Python code
48+
color: 2b67c6
49+
- name: question
50+
description: Further information is requested
51+
color: d876e3
52+
- name: refactoring
53+
description: Refactoring
54+
color: ef67c4
55+
- name: removal
56+
description: Removals and Deprecations
57+
color: 9ae7ea
58+
- name: style
59+
description: Style
60+
color: c120e5
61+
- name: testing
62+
description: Testing
63+
color: b1fc6f
64+
- name: wontfix
65+
description: This will not be worked on
66+
color: ffffff

.github/release-drafter.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
categories:
2+
- title: ":boom: Breaking Changes"
3+
label: "breaking"
4+
- title: ":rocket: Features"
5+
label: "enhancement"
6+
- title: ":fire: Removals and Deprecations"
7+
label: "removal"
8+
- title: ":beetle: Fixes"
9+
label: "bug"
10+
- title: ":racehorse: Performance"
11+
label: "performance"
12+
- title: ":rotating_light: Testing"
13+
label: "testing"
14+
- title: ":construction_worker: Continuous Integration"
15+
label: "ci"
16+
- title: ":books: Documentation"
17+
label: "documentation"
18+
- title: ":hammer: Refactoring"
19+
label: "refactoring"
20+
- title: ":lipstick: Style"
21+
label: "style"
22+
- title: ":package: Dependencies"
23+
labels:
24+
- "dependencies"
25+
- "build"
26+
template: |
27+
## Changes
28+
29+
$CHANGES

.github/workflows/constraints.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pip==21.3.1
2+
poetry==1.3.1
3+
virtualenv==20.10.0

.github/workflows/labeler.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Labeler
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
9+
jobs:
10+
labeler:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check out the repository
14+
uses: actions/[email protected]
15+
16+
- name: Run Labeler
17+
uses: crazy-max/[email protected]
18+
with:
19+
skip-delete: true

.github/workflows/release.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
jobs:
8+
release:
9+
name: Release
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out the repository
13+
uses: actions/[email protected]
14+
with:
15+
fetch-depth: 2
16+
17+
- name: Set up Python
18+
uses: actions/[email protected]
19+
with:
20+
python-version: "3.10"
21+
22+
- name: Upgrade pip
23+
run: |
24+
pip install --constraint=.github/workflows/constraints.txt pip
25+
pip --version
26+
27+
- name: Install Poetry
28+
run: |
29+
pip install --constraint=.github/workflows/constraints.txt poetry
30+
poetry --version
31+
32+
- name: Check if there is a parent commit
33+
id: check-parent-commit
34+
run: |
35+
echo "::set-output name=sha::$(git rev-parse --verify --quiet HEAD^)"
36+
37+
- name: Build package
38+
run: |
39+
poetry build --ansi
40+
41+
- name: Publish package on PyPI
42+
uses: pypa/[email protected]
43+
with:
44+
user: __token__
45+
password: ${{ secrets.PYPI_TOKEN }}

.github/workflows/tests.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Tests
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
tests:
9+
name: ${{ matrix.session }} ${{ matrix.python }} / ${{ matrix.os }}
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
include:
15+
- { python: "3.11", os: "ubuntu-latest", session: "tests" }
16+
- { python: "3.10", os: "ubuntu-latest", session: "tests" }
17+
18+
env:
19+
NOXSESSION: ${{ matrix.session }}
20+
FORCE_COLOR: "1"
21+
PRE_COMMIT_COLOR: "always"
22+
23+
steps:
24+
- name: Check out the repository
25+
uses: actions/[email protected]
26+
27+
- name: Set up Python ${{ matrix.python }}
28+
uses: actions/[email protected]
29+
with:
30+
python-version: ${{ matrix.python }}
31+
32+
- name: Upgrade pip
33+
run: |
34+
pip install --constraint=.github/workflows/constraints.txt pip
35+
pip --version
36+
37+
- name: Upgrade pip in virtual environments
38+
shell: python
39+
run: |
40+
import os
41+
import pip
42+
43+
with open(os.environ["GITHUB_ENV"], mode="a") as io:
44+
print(f"VIRTUALENV_PIP={pip.__version__}", file=io)
45+
46+
- name: Install Poetry
47+
run: |
48+
pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry
49+
poetry --version

0 commit comments

Comments
 (0)