Skip to content
Open
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
13 changes: 7 additions & 6 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,19 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }} # Pull the commit from the forked repo
persist-credentials: false # Don't persist credentials for subsequent actions
- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: '3.10'
- name: Install dependencies
run: |
pip install --no-cache-dir hatch
- name: Sync dependencies from lock file
run: uv sync --frozen --all-extras --group dev
- name: Run integration tests
env:
AWS_REGION: us-east-1
AWS_REGION_NAME: us-east-1 # Needed for LiteLLM
STRANDS_TEST_API_KEYS_SECRET_NAME: ${{ secrets.STRANDS_TEST_API_KEYS_SECRET_NAME }}
id: tests
run: |
hatch test tests_integ
uv run poe test-integ
25 changes: 7 additions & 18 deletions .github/workflows/pypi-publish-on-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,19 @@ jobs:
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install hatch twine

- name: Validate version
run: |
version=$(hatch version)
if [[ $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Valid version format"
exit 0
else
echo "Invalid version format"
exit 1
fi
- name: Sync dependencies from lock file
run: uv sync --frozen

- name: Build
run: |
hatch build
uv build

- name: Store the distribution packages
uses: actions/upload-artifact@v4
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/test-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,17 @@ jobs:
with:
ref: ${{ inputs.ref }} # Explicitly define which commit to check out
persist-credentials: false # Don't persist credentials for subsequent actions
- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --no-cache-dir hatch
- name: Sync dependencies from lock file
run: uv sync --frozen --all-extras --group dev
- name: Run Unit tests
id: tests
run: hatch test tests --cover
run: uv run poe test-cov
continue-on-error: false
lint:
name: Lint
Expand All @@ -78,17 +79,16 @@ jobs:
ref: ${{ inputs.ref }}
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
python-version: '3.10'
cache: 'pip'

- name: Install dependencies
run: |
pip install --no-cache-dir hatch
- name: Sync dependencies from lock file
run: uv sync --frozen --all-extras --group dev

- name: Run lint
id: lint
run: hatch run test-lint
run: uv run poe lint-check
continue-on-error: false
30 changes: 15 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
repos:
- repo: local
hooks:
- id: hatch-format
name: Format code
entry: hatch fmt --formatter
- id: format-check
name: Check code formatting
entry: uv run poe format-check
language: system
pass_filenames: false
types: [python]
stages: [pre-commit]
- id: hatch-lint
name: Lint code
entry: hatch run test-lint
- id: lint-check
name: Check code linting
entry: uv run poe lint-check
language: system
pass_filenames: false
types: [python]
stages: [pre-commit]
- id: hatch-test-lint
name: Type linting
entry: hatch run test-lint
- id: typecheck
name: Type checking
entry: uv run poe typecheck
language: system
pass_filenames: false
types: [ python ]
stages: [ pre-commit ]
- id: hatch-test
types: [python]
stages: [pre-commit]
- id: test
name: Unit tests
entry: hatch test
entry: uv run poe test
language: system
pass_filenames: false
types: [python]
stages: [pre-commit]
- id: commitizen-check
name: Check commit message
entry: hatch run cz check --commit-msg-file
entry: uv run cz check --commit-msg-file
language: system
stages: [commit-msg]
stages: [commit-msg]
Loading
Loading