Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github actions version updates + poetry check --lock inside the project #111

Merged
merged 9 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/setup-poetry-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ runs:
using: "composite"
steps:
- name: Set up python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}

Expand All @@ -22,7 +22,7 @@ runs:

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ inputs.python-version }}-${{ hashFiles('poetry.lock') }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
Expand All @@ -39,18 +39,18 @@ jobs:
fail-fast: false
steps:
- name: Check out
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Load cached venv
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .tox
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
Expand All @@ -64,14 +64,14 @@ jobs:
run: tox

- name: Upload coverage reports to Codecov with GitHub Action on Python 3.11
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
if: ${{ matrix.python-version == '3.11' }}

check-docs:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up the environment
uses: ./.github/actions/setup-poetry-env
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/on-release-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up the environment
uses: ./.github/actions/setup-poetry-env
Expand All @@ -32,7 +32,7 @@ jobs:
needs: publish
steps:
- name: Check out
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up the environment
uses: ./.github/actions/setup-poetry-env
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ install: ## Install the poetry environment

.PHONY: check
check: ## Run code quality tools.
@echo "🚀 Checking Poetry lock file consistency with 'pyproject.toml': Running poetry lock --check"
@echo "🚀 Checking Poetry lock file consistency with 'pyproject.toml': Running poetry check --lock"
@poetry check --lock
@echo "🚀 Linting code: Running pre-commit"
@poetry run pre-commit run -a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ runs:
using: "composite"
steps:
- name: Set up python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: {% raw %}${{ inputs.python-version }}{% endraw %}

Expand All @@ -22,7 +22,7 @@ runs:

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .venv
key: {% raw %}venv-${{ runner.os }}-${{ inputs.python-version }}-${{ hashFiles('poetry.lock') }}{% endraw %}
Expand Down
14 changes: 7 additions & 7 deletions {{cookiecutter.project_name}}/.github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: {% raw %}pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}{% endraw %}
Expand All @@ -33,18 +33,18 @@ jobs:
fail-fast: false
steps:
- name: Check out
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: {% raw %}${{ matrix.python-version }}{% endraw %}

- name: Install Poetry
uses: snok/install-poetry@v1

- name: Load cached venv
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: .tox
key: {% raw %}venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}{% endraw %}
Expand All @@ -58,7 +58,7 @@ jobs:
run: tox
{% if cookiecutter.codecov == "y" %}
- name: Upload coverage reports to Codecov with GitHub Action on Python 3.11
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
if: {% raw %}${{ matrix.python-version == '3.11' }}{% endraw %}
{%- endif %}

Expand All @@ -68,7 +68,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up the environment
uses: ./.github/actions/setup-poetry-env
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up the environment
uses: ./.github/actions/setup-poetry-env
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up the environment
uses: ./.github/actions/setup-poetry-env
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ jobs:
validate-codecov-config:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Validate codecov configuration
run: curl -sSL --fail-with-body --data-binary @codecov.yaml https://codecov.io/validate
4 changes: 2 additions & 2 deletions {{cookiecutter.project_name}}/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ install: ## Install the poetry environment and install the pre-commit hooks

.PHONY: check
check: ## Run code quality tools.
@echo "🚀 Checking Poetry lock file consistency with 'pyproject.toml': Running poetry lock --check"
@poetry lock --check
@echo "🚀 Checking Poetry lock file consistency with 'pyproject.toml': Running poetry check --lock"
@poetry check --lock
@echo "🚀 Linting code: Running pre-commit"
@poetry run pre-commit run -a
@echo "🚀 Static type checking: Running mypy"
Expand Down