-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from m9810223/dev
chore
- Loading branch information
Showing
15 changed files
with
221 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: pdm-project/setup-pdm@v3 | ||
- run: pdm publish -u "__token__" -P "${{ secrets.PYPI_API_TOKEN }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
on: | ||
workflow_call: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
|
||
jobs: | ||
auto-update: | ||
# browniebroke/pre-commit-autoupdate-action | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
- run: python -m pip install pre-commit | ||
- run: pre-commit autoupdate --freeze | ||
- run: pre-commit run -a | ||
- uses: peter-evans/create-pull-request@v6 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: pre-commit-autoupdate | ||
title: Update pre-commit hooks | ||
commit-message: "chore: update pre-commit hooks" | ||
body: Update versions of pre-commit hooks to latest version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
- uses: pre-commit/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
concurrency: | ||
group: python-semantic-release | ||
# cancel-in-progress: true | ||
|
||
permissions: | ||
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs#defining-access-for-the-github_token-scopes | ||
contents: write | ||
|
||
defaults: | ||
run: | ||
working-directory: ./ | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: python-semantic-release/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# https://github.com/actions/runner-images#available-images | ||
os: [ubuntu-latest] | ||
py_ver: | ||
- "3.12" | ||
- "3.11" | ||
- "3.10" | ||
- "3.9" | ||
- "3.8" | ||
pw_browser: [chromium] | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pdm-project/setup-pdm@v4 | ||
with: | ||
python-version: ${{ matrix.py_ver }} | ||
cache: true | ||
cache-dependency-path: "**/pdm.lock" | ||
- run: pdm install | ||
- run: pdm list --graph | ||
- run: pdm run playwright install --with-deps ${{ matrix.pw_browser }} | ||
- run: pdm run pytest --browser=${{ matrix.pw_browser }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,21 @@ | ||
name: main | ||
|
||
on: | ||
pull_request_review: | ||
push: | ||
branches: | ||
- "*" | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
# if: false | ||
# permissions -> https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idpermissions | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
py_ver: | ||
- "3.12" | ||
- "3.11" | ||
- "3.10" | ||
- "3.9" | ||
- "3.8" | ||
pw_browser: [chromium] | ||
runs-on: ${{ matrix.os }} | ||
test: | ||
uses: ./.github/workflows/_test.yml | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.py_ver }} | ||
- uses: pdm-project/setup-pdm@v3 | ||
- run: pdm install | ||
- run: pdm list --graph | ||
- run: pdm run playwright install --with-deps ${{ matrix.pw_browser }} | ||
- run: pdm run pytest --browser=${{ matrix.pw_browser }} | ||
pre-commit: | ||
uses: ./.github/workflows/_pre-commit.yml | ||
|
||
release: # https://github.com/python-semantic-release/python-semantic-release/blob/master/.github/workflows/main.yml | ||
python-semantic-release: | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
needs: | ||
- test | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
runs-on: ${{ matrix.os }} | ||
|
||
concurrency: release | ||
uses: ./.github/workflows/_python-semantic-release.yml | ||
permissions: | ||
id-token: write | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: python-semantic-release/[email protected] | ||
id: release | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
root_options: "-vv" | ||
|
||
# https://python-semantic-release.readthedocs.io/en/latest/migrating_from_v7.html | ||
|
||
- name: Publish package distributions to PyPI | ||
id: pypi-publish | ||
if: steps.release.outputs.released == 'true' | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
verbose: true | ||
user: ${{ secrets.PYPI_USERNAME }} | ||
password: ${{ secrets.PYPI_PASSWORD }} | ||
|
||
- name: Publish package distributions to GitHub Releases | ||
id: github-release | ||
if: steps.release.outputs.released == 'true' | ||
uses: python-semantic-release/upload-to-gh-release@main | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
tag: ${{ steps.release.outputs.tag }} | ||
needs: | ||
- test | ||
- pre-commit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
on: | ||
workflow_run: | ||
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run | ||
workflows: | ||
- .github/workflows/main.yml | ||
types: | ||
- completed | ||
|
||
jobs: | ||
is-success: | ||
if: ${{ github.ref == 'refs/heads/master' }} && ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo "is-success" | ||
|
||
pre-commit-autoupdate: | ||
uses: ./.github/workflows/_pre-commit-autoupdate.yml | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
pdm-publish: | ||
needs: | ||
- is-success | ||
uses: ./.github/workflows/_pdm-publish.yml | ||
permissions: | ||
contents: read | ||
id-token: write | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.8 | ||
3.12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.