Skip to content
Closed
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
45 changes: 43 additions & 2 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,49 @@ jobs:
run: |
hatch test tests_integ

- name: Publish test metrics to CloudWatch
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: ./build/test-results.xml

- name: print ls
if: always()
run: |
ls -a
pwd
find .

upload-metrics:
runs-on: ubuntu-latest
needs: check-access-and-checkout
if: always()
permissions:
id-token: write
contents: read
steps:
- name: Configure Credentials
uses: aws-actions/configure-aws-credentials@v5
with:
role-to-assume: ${{ secrets.STRANDS_INTEG_TEST_ROLE }}
aws-region: us-east-1
mask-aws-account-id: true

- name: Checkout main
uses: actions/checkout@v6
with:
ref: main
sparse-checkout: |
.github/scripts
persist-credentials: false

- name: Download test results
uses: actions/download-artifact@v4
with:
name: test-results

- name: Publish test metrics to CloudWatch
run: |
pip install --no-cache-dir boto3
python .github/scripts/upload-integ-test-metrics.py ./build/test-results.xml ${{ github.event.repository.name }}
python .github/scripts/upload-integ-test-metrics.py test-result.xml ${{ github.event.repository.name }}
2 changes: 1 addition & 1 deletion tests_integ/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def _load_api_keys_from_secrets_manager():
Validate that required environment variables are set when running in GitHub Actions.
This prevents tests from being unintentionally skipped due to missing credentials.
"""
if os.environ.get("GITHUB_ACTIONS") != "true":
if os.environ.get("GITHUB_ACTIONS") != "false":
logger.warning("Tests running outside GitHub Actions, skipping required provider validation")
return

Expand Down
Loading