Skip to content

Commit

Permalink
First part of updating CI
Browse files Browse the repository at this point in the history
  • Loading branch information
znicholls committed Aug 21, 2024
1 parent b257fce commit 8bde421
Show file tree
Hide file tree
Showing 11 changed files with 256 additions and 253 deletions.
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: Bug report
about: Report a bug
title: ''
labels: bug
assignees: ''

---

## Describe the bug
<!--- A clear and concise description of what the bug is. -->

## Failing Test
<!---
Please put the code (ideally in the form of a unit test) which fails below.
e.g.
```python
def test_bug_12():
# Python code here which fails because of the bug
# This is best if other developers can simply copy and paste this test in
# order to run it
```
-->

## Expected behavior
<!--- A clear and concise description of what you expected to happen. -->

## Screenshots
<!--- If applicable, add screenshots to help explain your problem. -->

## System
<!--- Please complete the following information. -->

- OS: [e.g. Windows, Linux, macOS]
- Python version [e.g. Python 3.11]
- Please also upload your `poetry.lock` file (first run `poetry lock` to make sure the lock file is up-to-date)

## Additional context
<!--- Add any other context about the problem here. -->
31 changes: 0 additions & 31 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Default
about: Report an issue or problem
title: ''
labels: triage
assignees: ''

---

## The problem
<!--- Useful to breakdown to "As a [persona], I [want to do], so that [reason] -->

## Definition of "done"
<!---
What are the things that must be true in order to close this issue
We find that describing these as dot points works well.
-->

## Additional context
<!--- Add any additional context can go here -->
29 changes: 20 additions & 9 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
---
name: Feature Request
about: Suggest an idea for this project
about: Request a feature or suggest an idea for this project
title: ''
labels: feature
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
## The motivation

A clear and concise description of what the problem is. Ex. It's annoying that I always have to [...]
<!--- Useful to breakdown to "As a [persona], I [want to do], so that [reason] -->

**Describe the solution you'd like**
## The proposed solution

A clear and concise description of the solution you would like to see.
<!---
If you'd like, please provide a description of the solution you would like to see
**Describe alternatives you've considered**
If you don't have any ideas for the solution, simply leave this blank
-->

A clear and concise description of any alternative solutions or features you've considered.
## Alternatives

**Additional context**
<!---
If you've considered any alternatives, please describe them here
Add any other context or screenshots about the feature request here.
If you don't have any alternatives, simply leave this blank
-->

## Additional context

<!--- Add any additional context can go here -->
17 changes: 0 additions & 17 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

37 changes: 37 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "Setup Python and pdm"
description: "setup Python and pdm with caches"

inputs:
python-version:
description: "Python version to use"
required: true
pdm-dependency-install-flags:
description: "Flags to pass to pdm when running `pdm install`"
required: true
run-pdm-install:
description: "Should we run the pdm install steps"
required: false
default: true

runs:
using: "composite"
steps:
- name: Setup PDM
id: setup-pdm
uses: pdm-project/setup-pdm@v4.1
with:
python-version: ${{ inputs.python-version }}
cache: true
- name: Install dependencies
if: ${{ (inputs.run-pdm-install == 'true') && (steps.setup-pdm.outputs.cache-hit != 'true') }}
shell: bash
run: |
pdm install --no-self ${{ inputs.pdm-dependency-install-flags }}
# Now run same command but let the package install too
- name: Install package
# To ensure that the package is always installed, this step is run even if the cache was hit
if: ${{ inputs.run-pdm-install == 'true' }}
shell: bash
run: |
pdm install ${{ inputs.pdm-dependency-install-flags }}
pdm run python --version # Check python version just in case
9 changes: 9 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Description

## Checklist

Please confirm that this pull request has done the following:

- [ ] Tests added
- [ ] Documentation added (where applicable)
- [ ] Changelog item added to `changelog/`
3 changes: 3 additions & 0 deletions .github/release_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Announcements

* Announcement 1
167 changes: 0 additions & 167 deletions .github/workflows/ci-cd-workflow.yml

This file was deleted.

Loading

0 comments on commit 8bde421

Please sign in to comment.