-
-
Notifications
You must be signed in to change notification settings - Fork 1
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 #19 from dryan/change-to-uv
Change to uv
- Loading branch information
Showing
13 changed files
with
1,056 additions
and
873 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
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,60 +1,41 @@ | ||
name: Test Code Changes | ||
on: | ||
pull_request: | ||
branches: [main] | ||
branches: | ||
- main | ||
jobs: | ||
test-django: | ||
name: Python Test Suite | ||
strategy: | ||
matrix: | ||
python-version: [3.7, 3.8, 3.9, "3.10", "3.11-dev"] | ||
python-version: | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
- "3.12" | ||
- "3.13" | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
D3PLOY_DEBUG: true | ||
D3PLOY_DEBUG: yes | ||
D3PLOY_TEST_BUCKET: d3ploy-tests-${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install poetry | ||
run: | | ||
curl -sSL https://install.python-poetry.org/ | python - | ||
sudo ln -s $HOME/.poetry/bin/poetry /usr/local/bin/poetry | ||
poetry config virtualenvs.path ~/.poetry/environments | ||
- name: Cache Python packages | ||
uses: actions/cache@v1 | ||
id: poetry-cache | ||
env: | ||
cache-name: cache-poetry-packages | ||
with: | ||
path: ~/.poetry/environments | ||
key: ${{ runner.os }}-python-${{ matrix.python-version }}-build-${{ env.cache-name }}-${{ hashFiles('**/poetry.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-python-${{ matrix.python-version }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-python-${{ matrix.python-version }}-build- | ||
${{ runner.os }}-python-${{ matrix.python-version }}- | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v3 | ||
- name: Install Python dependencies | ||
run: | | ||
poetry install | ||
if: steps.poetry-cache.outputs.cache-hit != 'true' | ||
- name: Run Black Tests | ||
run: poetry run black --check . | ||
- name: Run Flake8 Tests | ||
run: poetry run flake8 | ||
- name: Run isort Tests | ||
run: poetry run isort --recursive --check-only . | ||
uv sync | ||
- name: Run ruff tests | ||
run: uv run ruff check d3ploy | ||
- name: Run Python Unit Tests | ||
run: | | ||
poetry run coverage erase | ||
poetry run coverage run --source='d3ploy' tests/test.py "$@" | ||
poetry run coverage html | ||
poetry run coverage report --fail-under=100 --skip-covered | ||
- name: Store Python coverage results | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: python-coverage | ||
path: htmlcov | ||
uv run coverage erase | ||
uv run coverage run --source='d3ploy' tests/test.py "$@" | ||
uv run coverage html | ||
uv run coverage report --fail-under=100 --skip-covered |
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 |
---|---|---|
|
@@ -124,5 +124,3 @@ dmypy.json | |
|
||
.DS_Store | ||
*.ignore | ||
Pipfile.lock | ||
|
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,14 +1,6 @@ | ||
repos: | ||
- repo: https://github.com/ambv/black | ||
rev: 21.5b1 | ||
hooks: | ||
- id: black | ||
language_version: python3.8 | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: "3.9.2" | ||
hooks: | ||
- id: flake8 | ||
- repo: https://github.com/timothycrosley/isort | ||
rev: "5.8.0" | ||
hooks: | ||
- id: isort | ||
- hooks: | ||
- id: ruff | ||
- id: ruff-format | ||
repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.7.3 |
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
Oops, something went wrong.