Skip to content

Commit

Permalink
feat: Check with deps latest on PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
attakei committed Oct 6, 2024
1 parent 2c5ab0c commit afbefbd
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions {{cookiecutter.project_basename}}/.github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
- '**'
pull_request:
workflow_dispatch:
schedule:
- cron: '0 9 * * 5' # 18:00 on Friday JST

jobs:
lint:
Expand All @@ -17,6 +19,7 @@ jobs:
- uses: astral-sh/setup-uv@v2
- name: Lint by pre-commit
run: |
uv sync --frozen --all-extras
uvx pre-commit run --all-files
source-test:
runs-on: ubuntu-latest
Expand All @@ -35,19 +38,27 @@ jobs:
{%- if cookiecutter.requires_python in ["3.9", "3.10", "3.11", "3.12"] %}
- '3.12'
{%- endif %}
workspace: ['locked', 'latest']
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v2
- uses: actions/setup-python@v5
id: 'setup-python'
with:
python-version: {% raw %}${{ matrix.python-version }}{% endraw %}
- name: Run tests
{%- raw %}
- name: 'Configure env as locked deps by uv.lock'
run: |
{%- raw %}
uv sync --frozen --python='${{ steps.setup-python.outputs.python-path }}'
if: ${{ matrix.workspace == 'locked'}}
- name: 'Configure env as latest deps on PyPI'
run: |
uv sync -U --python='${{ steps.setup-python.outputs.python-path }}'
if: ${{ matrix.workspace == 'latest'}}
{%- endraw %}
- name: 'Run tests'
run: |
uv run pytest
{%- endraw %}
doc-test:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit afbefbd

Please sign in to comment.