Skip to content

Commit

Permalink
Merge pull request #808 from chuckwondo/netrc-issue-480
Browse files Browse the repository at this point in the history
Use temp .netrc file for integration tests and support NETRC environment variable
  • Loading branch information
chuckwondo authored Oct 6, 2024
2 parents b7e29ec + ab066bc commit c8d6838
Show file tree
Hide file tree
Showing 24 changed files with 521 additions and 527 deletions.
2 changes: 1 addition & 1 deletion .github/actions/install-pkg/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ runs:

- name: Install package and test dependencies
shell: bash
run: pip install .[test]
run: pip install --root-user-action ignore ".[test]"
9 changes: 6 additions & 3 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,19 @@ jobs:

steps:
- name: Fetch user permission
if: github.event_name == 'pull_request_target'
id: permission
uses: actions-cool/check-user-permission@v2
with:
require: write
username: ${{ github.triggering_actor }}

- name: Check user permission
if: ${{ steps.permission.outputs.require-result == 'false' }}
# The name of the output require-result is a bit confusing, but when its value
# is 'false', it means that the triggering actor does NOT have the required
# permission.
if: github.event_name == 'pull_request_target' && steps.permission.outputs.require-result == 'false'

# If the triggering actor does not have write permission (i.e., this is a
# PR from a fork), then we exit, otherwise most of the integration tests will
# fail because they require access to secrets. In this case, a maintainer
Expand All @@ -78,8 +83,6 @@ jobs:
env:
EARTHDATA_USERNAME: ${{ secrets.EDL_USERNAME }}
EARTHDATA_PASSWORD: ${{ secrets.EDL_PASSWORD }}
EARTHACCESS_TEST_USERNAME: ${{ secrets.EDL_USERNAME }}
EARTHACCESS_TEST_PASSWORD: ${{ secrets.EDL_PASSWORD }}
run: ./scripts/integration-test.sh

- name: Upload coverage report
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-mindeps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: pyproject.toml
python-version: 3.9

- name: Install minimum-compatible dependencies
run: uv sync --resolution lowest-direct --extra test
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ htmlcov
dist
site
.coverage
.coverage.*
coverage.xml
.netlify
test.db
Expand Down
Loading

0 comments on commit c8d6838

Please sign in to comment.