Skip to content

Commit

Permalink
Merge pull request #277 from DontShaveTheYak/develop
Browse files Browse the repository at this point in the history
Release v0.6.3
  • Loading branch information
shadycuz committed Apr 18, 2024
2 parents 5a00714 + 733a96f commit 074a352
Show file tree
Hide file tree
Showing 11 changed files with 238 additions and 187 deletions.
46 changes: 27 additions & 19 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,36 @@
{
"name": "${localWorkspaceFolderBasename}",
"build": {
"dockerfile": "Dockerfile",
"dockerfile": "Dockerfile"
},
// Set *default* container specific settings.json values on container create.
"settings": {
"python.analysis.diagnosticSeverityOverrides": {
"reportGeneralTypeIssues": "none"
},
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/usr/bin/bash",
"icon": "terminal-bash"
}
},
"terminal.integrated.defaultProfile.linux": "bash"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-azuretools.vscode-docker",
"eamodio.gitlens",
"ms-python.python",
"njpwerner.autodocstring"
],
"customizations": {
"vscode": {
"settings": {
"python.analysis.diagnosticSeverityOverrides": {
"reportGeneralTypeIssues": "none"
},
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/usr/bin/bash",
"icon": "terminal-bash"
}
},
"terminal.integrated.defaultProfile.linux": "bash"
},
"extensions": [
"ms-azuretools.vscode-docker",
"eamodio.gitlens",
"ms-python.python",
"njpwerner.autodocstring",
"ms-python.black-formatter",
"ms-python.flake8",
"matangover.mypy",
"ms-python.isort"
]
}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: PR

on:
pull_request_target:
types: [opened, labeled, unlabeled, synchronize]
types: [opened, labeled, unlabeled]

jobs:
label:
Expand Down
46 changes: 31 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,39 @@ name: Release
concurrency: release

on:
pull_request:
pull_request_target:
types: closed
branches:
- develop
- master

jobs:
check:
name: Check Permissions
runs-on: ubuntu-latest
steps:

- name: Get User Permission
id: checkAccess
uses: actions-cool/check-user-permission@v2
with:
require: write
username: ${{ github.triggering_actor }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check User Permission
if: steps.checkAccess.outputs.require-result == 'false'
run: |
echo "${{ github.triggering_actor }} does not have permissions on this repo."
echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}"
echo "Job originally triggered by ${{ github.actor }}"
exit 1
tag:
name: Create Tag
runs-on: ubuntu-latest
if: github.event.pull_request.merged && (github.base_ref == 'develop' || github.base_ref == 'master')
needs: check
if: github.event.pull_request.merged
outputs:
tag: ${{ steps.bump.outputs.next_tag }}
steps:
Expand All @@ -22,7 +47,7 @@ jobs:
fetch-depth: 0

- name: Setup Python 3.11
uses: actions/setup-python@v4.7.1
uses: actions/setup-python@v5.1.0
with:
python-version: '3.11'
architecture: x64
Expand Down Expand Up @@ -75,24 +100,15 @@ jobs:
uses: actions/checkout@v4.1.1

- name: Setup Python 3.11
uses: actions/setup-python@v4.7.1
uses: actions/setup-python@v5.1.0
with:
python-version: '3.11'
architecture: x64

- name: Setup Poetry
run: pip install poetry==1.4.0

- name: Publish to Test PyPI
if: github.base_ref == 'develop'
run: |
poetry version ${{needs.tag.outputs.tag}}
poetry build
poetry config repositories.testpypi https://test.pypi.org/legacy/
poetry publish -r testpypi --username '__token__' --password '${{ secrets.TEST_PYPI_TOKEN }}'
- name: Publish to PyPI
if: github.base_ref == 'master'
run: |
poetry version ${{needs.tag.outputs.tag}}
poetry build
Expand All @@ -104,7 +120,7 @@ jobs:
needs: [tag, publish]
steps:
- name: Create Draft Release
uses: release-drafter/release-drafter@v5.25.0
uses: release-drafter/release-drafter@v6.0.0
if: github.base_ref == 'develop'
with:
tag: ${{needs.tag.outputs.tag}}
Expand All @@ -114,7 +130,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release
uses: release-drafter/release-drafter@v5.25.0
uses: release-drafter/release-drafter@v6.0.0
if: github.base_ref == 'master'
with:
tag: ${{needs.tag.outputs.tag}}
Expand Down
34 changes: 28 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,43 @@ on:
push:
branches:
- "master"
pull_request_target:
types: [opened, synchronize, reopened]
pull_request:
paths-ignore:
- ".github/workflows/release.yml"
- ".github/workflows/pr_checks.yml"
types: [opened, synchronize, reopened]

jobs:
check:
name: Check Permissions
runs-on: ubuntu-latest
steps:

- name: Get User Permission
id: checkAccess
uses: actions-cool/check-user-permission@v2
with:
require: write
username: ${{ github.triggering_actor }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check User Permission
if: steps.checkAccess.outputs.require-result == 'false'
run: |
echo "${{ github.triggering_actor }} does not have permissions on this repo."
echo "Current permission level is ${{ steps.checkAccess.outputs.user-permission }}"
echo "Job originally triggered by ${{ github.actor }}"
exit 1
single:
runs-on: ubuntu-latest
name: Python 3.11
needs: check
steps:
- name: Checkout Code
uses: actions/checkout@v4.1.1

- name: Setup Latest Python
uses: actions/setup-python@v4.7.1
uses: actions/setup-python@v5.1.0
with:
python-version: 3.11
architecture: x64
Expand All @@ -41,7 +63,7 @@ jobs:
run: coverage xml --fail-under=0

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.1.4
uses: codecov/codecov-action@v4.3.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unit
Expand All @@ -59,7 +81,7 @@ jobs:
uses: actions/checkout@v4.1.1

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4.7.1
uses: actions/setup-python@v5.1.0
with:
python-version: ${{ matrix.python-version }}
architecture: x64
Expand Down
10 changes: 4 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{
"python.formatting.provider": "black",
"python.linting.flake8Enabled": true,
"python.linting.enabled": true,
"editor.formatOnSave": true,
"python.testing.pytestArgs": [
"tests/"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"python.linting.mypyEnabled": true,
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
"source.organizeImports": "always"
},
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true
},
"[dockerfile]": {
"editor.quickSuggestions": {
Expand Down
Loading

0 comments on commit 074a352

Please sign in to comment.