Skip to content

Commit

Permalink
build: move to hatch
Browse files Browse the repository at this point in the history
Also fixes #122 and #123

Signed-off-by: Douglas Myers-Turnbull <dmyersturnbull@gmail.com>
  • Loading branch information
dmyersturnbull committed Aug 7, 2023
1 parent 8c8324e commit 775459a
Show file tree
Hide file tree
Showing 47 changed files with 965 additions and 1,773 deletions.
14 changes: 0 additions & 14 deletions .github/ISSUE_TEMPLATE/bug.md

This file was deleted.

47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# SPDX-FileCopyrightText: Copyright 2020-2023, Contributors to CICD
# SPDX-PackageHomePage: https://github.com/dmyersturnbull/cicd
# SPDX-License-Identifier: Apache-2.0

name: "Bug"
title: "🐛 Bug"
description: "Bug report"
labels: ["type: fix"]

body:
- type: textarea
id: description
attributes:
label: What happened?
placeholder: Detail what you did and what happened.
validations:
required: true
- type: dropdown
id: os
attributes:
label: What OS types are you seeing the problem on?
multiple: true
options:
- Windows
- Linux
- macOS
validations:
required: false
- type: dropdown
id: browsers
attributes:
label: What browsers are you seeing the problem on?
multiple: true
options:
- Chrome
- Firefox
- Edge
- Safari
- Opera
- Samsung Internet
validations:
required: false
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output.
File renamed without changes.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# SPDX-FileCopyrightText: Copyright 2020-2023, Contributors to CICD
# SPDX-PackageHomePage: https://github.com/dmyersturnbull/cicd
# SPDX-License-Identifier: Apache-2.0

name: "Documentation"
title: "📚 Documentation"
description: "Documentation issue"
labels: ["type: docs"]

body:
- type: textarea
id: description
attributes:
label: What needs work?
placeholder: Describe the documentation issue.
validations:
required: true
8 changes: 0 additions & 8 deletions .github/ISSUE_TEMPLATE/documentation.md

This file was deleted.

7 changes: 0 additions & 7 deletions .github/ISSUE_TEMPLATE/feature.md

This file was deleted.

17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# SPDX-FileCopyrightText: Copyright 2020-2023, Contributors to CICD
# SPDX-PackageHomePage: https://github.com/dmyersturnbull/cicd
# SPDX-License-Identifier: Apache-2.0

name: "Feature"
title: "✨ Feature"
description: "Feature request"
labels: ["type: feature"]

body:
- type: textarea
id: description
attributes:
label: What is the feature request?
placeholder: Describe the feature you would like.
validations:
required: true
14 changes: 0 additions & 14 deletions .github/ISSUE_TEMPLATE/performance.md

This file was deleted.

52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/performance.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# SPDX-FileCopyrightText: Copyright 2020-2023, Contributors to CICD
# SPDX-PackageHomePage: https://github.com/dmyersturnbull/cicd
# SPDX-License-Identifier: Apache-2.0

name: "Performance"
title: "🐢 Performance"
description: "Performance issue"
labels: ["type: performance"]

body:
- type: textarea
id: description
attributes:
label: What is the performance issue?
placeholder: Detail your steps and where the performance dropped.
validations:
required: true
- type: input
id: version
attributes:
label: Version
description: What version are you running?
- type: dropdown
id: os
attributes:
label: What OS types are you seeing the problem on?
multiple: true
options:
- Windows
- Linux
- macOS
validations:
required: false
- type: dropdown
id: browsers
attributes:
label: What browsers are you seeing the problem on?
multiple: true
options:
- Chrome
- Firefox
- Edge
- Safari
- Opera
- Samsung Internet
validations:
required: false
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output.
14 changes: 0 additions & 14 deletions .github/ISSUE_TEMPLATE/security.md

This file was deleted.

64 changes: 64 additions & 0 deletions .github/ISSUE_TEMPLATE/security.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# SPDX-FileCopyrightText: Copyright 2020-2023, Contributors to CICD
# SPDX-PackageHomePage: https://github.com/dmyersturnbull/cicd
# SPDX-License-Identifier: Apache-2.0

name: "Security issue"
title: "🔒 Security issue"
description: "Security issue"
labels: ["kind: security 🔒"]

body:
- type: markdown
attributes:
value: |
If this is a serious issue, please omit details and the developers will get in touch.
- type: textarea
id: what-happened
attributes:
label: What is the security problem?
placeholder: Describe the issue, or leave blank.
validations:
required: false
- type: input
id: version
attributes:
label: Version
description: What version are you running?
- type: dropdown
id: os
attributes:
label: What OS types are you seeing the problem on?
multiple: true
options:
- Windows
- Linux
- macOS
validations:
required: false
- type: dropdown
id: browsers
attributes:
label: What browsers are you seeing the problem on?
multiple: true
options:
- Chrome
- Firefox
- Edge
- Safari
- Opera
- Samsung Internet
validations:
required: false
- type: input
id: contact
attributes:
label: Contact Details
description: How can we get in touch with you? (Not required.)
placeholder: ex. email@example.com
validations:
required: false
- type: textarea
id: logs
attributes:
label: Relevant log output
description: Please copy and paste any relevant log output.
1 change: 1 addition & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Pull request
49 changes: 43 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,47 @@
# SPDX-FileCopyrightText: Copyright 2020-2023, Contributors to CICD
# SPDX-PackageHomePage: https://github.com/dmyersturnbull/cicd
# SPDX-License-Identifier: Apache-2.0

version: 2
# see options in https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates
updates:
- package-ecosystem: "pip"
directory: "/"
- package-ecosystem: pip
directory: /
commit-message:
prefix: "build"
labels: ["type: build"]
groups:
python-main-deps:
patterns: ["*"]
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
interval: weekly
- package-ecosystem: github-actions
directory: .github
commit-message:
prefix: "ci"
labels: ["type: ci"]
groups:
github-action-deps:
patterns: ["*"]
schedule:
interval: "weekly"
interval: weekly
- package-ecosystem: docker
directory: /
commit-message:
prefix: "build"
labels: ["type: build"]
groups:
docker-deps:
patterns: ["*"]
schedule:
interval: weekly
- package-ecosystem: "npm"
directory: /
commit-message:
prefix: "build"
labels: ["type: build"]
groups:
npm-main-deps:
patterns: ["*"]
schedule:
interval: weekly
12 changes: 8 additions & 4 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# Various static code analysis and checks
# Runs on a schedule (weekly)
name: check
# Runs on commit or pull (to any branch)
# and on a schedule (weekly)
name: Static checks
on:
push:
branches: [main]
pull_request:
schedule:
- cron: 0 7 * * 6
- cron: "0 7 * * 6"
jobs:
analyze:
analyse:
name: Analyze with CodeQL
runs-on: ubuntu-latest
steps:
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
python-version: ["3.10"]
python-version: ["3.9"]
name: "test on ${{ matrix.os }}/py${{ matrix.python-version }}"
runs-on: "${{ matrix.os }}"
steps:
Expand All @@ -26,10 +26,6 @@ jobs:
- name: Test with tox
run: |
tox -v
- name: Test Docker build
if: ${{ ( runner.os == 'Linux' || runner.os == 'Windows' ) && matrix.python-version == '3.10' }}
run: |
docker build .
deploy:
runs-on: ubuntu-latest
needs: ["test"]
Expand All @@ -39,11 +35,13 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
python-version: "3.9"
- name: Install build meta-dependencies
run: |
pip install 'hatch>=1.7'
- name: Build sdists and wheels with Poetry
run: |
poetry build
poetry install
hatch build
- name: Attach artifacts to the GitHub release
uses: skx/github-action-publish-binaries@master
with:
Expand All @@ -52,4 +50,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to PyPi
run: |
poetry publish -vv --username __token__ --password ${{ secrets.PYPI_TOKEN }}
hatch build

0 comments on commit 775459a

Please sign in to comment.