Skip to content

Commit

Permalink
Merge pull request #105 from swimmwatch/dev
Browse files Browse the repository at this point in the history
Release v3.0.1
  • Loading branch information
swimmwatch authored Feb 17, 2025
2 parents fd9883b + bcef4a9 commit b1384c1
Show file tree
Hide file tree
Showing 10 changed files with 191 additions and 154 deletions.
4 changes: 4 additions & 0 deletions .github/actionlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
paths:
.github/workflows/**/*.{yml,yaml}:
ignore:
- 'shellcheck reported issue in this script: SC2086:.+'
25 changes: 25 additions & 0 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Lint GitHub Actions workflows
on:
pull_request:
paths:
- '**/*.py'
- 'poetry.lock'
- 'pyproject.toml'
- '.github/workflows/*.yml'
branches:
- master
- dev
- release/*

jobs:
actionlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Download actionlint"
id: get_actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
shell: bash
- name: "Check workflow files"
run: ${{ steps.get_actionlint.outputs.executable }} -color
shell: bash
17 changes: 9 additions & 8 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Deploy documentation to PyPI"
name: "Deploy documentation to GitHub Pages"
on:
release:
types:
Expand All @@ -13,25 +13,26 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.x" ]
poetry-version: [ "1.8.3" ]
python-version: ["3.x"]
poetry-version: ["1.8.5"]
steps:
- name: Checkout
- name: "Checkout"
uses: actions/checkout@v4
- name: Install Poetry
- name: "Install Poetry ${{matrix.poetry-version}}"
run: pipx install poetry==${{matrix.poetry-version}}
- name: "Setup Python ${{matrix.python-version}}"
uses: actions/setup-python@v5
with:
python-version: ${{matrix.python-version}}
cache: 'poetry'
- name: Install dependencies
- name: "Install dependencies"
run: make install
- name: Configure Git Credentials
- name: "Configure Git Credentials"
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- run: |
echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
Expand Down
41 changes: 23 additions & 18 deletions .github/workflows/python-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,50 +17,55 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
poetry-version: [ "1.8.3" ]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
poetry-version: ["1.8.5"]
steps:
- name: Checkout
- name: "Checkout"
uses: actions/checkout@v4
- name: Install Poetry
- name: "Install Poetry ${{matrix.poetry-version}}"
run: pipx install poetry==${{matrix.poetry-version}}
- name: "Setup Python ${{matrix.python-version}}"
uses: actions/setup-python@v5
with:
python-version: ${{matrix.python-version}}
cache: 'poetry'
- name: Install dependencies
- name: "Install dependencies"
run: make install
- name: Run flake8
- name: "Run flake8"
run: make flake
- name: Run mypy
- name: "Run mypy"
run: make mypy
- name: Run black lint
- name: "Run black lint"
run: make black-lint
- name: Lint documentation
- name: "Lint documentation"
run: make doc-lint
test:
name: "Run tests"
runs-on: ${{matrix.os}}
strategy:
matrix:
python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
poetry-version: [ "1.8.3" ]
os: [ "ubuntu-latest", "windows-latest", "macos-latest" ]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
poetry-version: ["1.8.5"]
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
steps:
- name: Checkout
- name: "Checkout"
uses: actions/checkout@v4
- name: Setup Poetry ${{matrix.poetry-version}}
- name: "Setup Poetry ${{matrix.poetry-version}}"
run: pipx install poetry==${{matrix.poetry-version}}
- name: Setup Python ${{matrix.python-versions}}
- name: "Setup Python ${{matrix.python-version}}"
uses: actions/setup-python@v5
with:
python-version: ${{matrix.python-version}}
cache: "poetry"
- name: Install dependencies
- name: "Install dependencies"
run: make install
- name: Run pytest
run: make test
- name: "Run pytest"
uses: nick-fields/retry@v3
with:
timeout_seconds: 120
max_attempts: 3
retry_on: error
command: make test
- name: "Upload coverage reports to Codecov"
if: matrix.python-version == '3.13' && matrix.os == 'ubuntu-latest' && github.actor != 'dependabot[bot]'
uses: codecov/codecov-action@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
poetry-version: ["1.8.3"]
poetry-version: ["1.8.5"]
steps:
- name: "Checkout"
uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ mkdocs-deploy:

test:
poetry run pytest --cov=$(PACKAGE_DIR) --cov-branch --cov-report=xml --numprocesses logical $(TESTS_DIR)

actionlint:
docker run --rm -v $(pwd):/repo --workdir /repo rhysd/actionlint:latest -color
2 changes: 1 addition & 1 deletion docs/references/data.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,10 @@ Links: https://core.telegram.org/bots/webapps#webappinitdata

```python
__init__(
query_id: str,
auth_date: int,
hash: str,
signature: str,
query_id: Optional[str] = None,
user: Optional[WebAppUser] = None,
receiver: Optional[WebAppUser] = None,
chat: Optional[WebAppChat] = None,
Expand Down
Loading

0 comments on commit b1384c1

Please sign in to comment.