Skip to content

Commit

Permalink
Fix github action's deprecated warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
henriquebastos committed Feb 10, 2024
1 parent 695a4e7 commit 927b432
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 15 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Upload Python Package to PyPI when a Release is Created
name: Release to PyPI

on:
release:
Expand All @@ -15,14 +15,12 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build poetry
python -m pip install --upgrade pip poetry
poetry install
- name: Run tests
run: |
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run linting and tests when pushing code.
name: Lint and test.

on: [push]

Expand All @@ -7,15 +7,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry
python -m pip install --upgrade pip poetry
poetry install
- name: Run pre-commit
- name: Lint
run: |
poetry run pre-commit run --all-files
Expand All @@ -27,13 +26,12 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry
python -m pip install --upgrade pip poetry
poetry install
- name: Test with pytest
- name: Test
run: poetry run pytest
74 changes: 73 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ pytz = "^2024.1"
pydantic = "^2.6.0"
attrs = "^23.2.0"
django = "^4.2.10"
build = "^1.0.3"

[tool.pytest.ini_options]
python_files = 'test*.py'

0 comments on commit 927b432

Please sign in to comment.