Updating earthaccess and fixing a few minor bugs. #383
Workflow file for this run
This file contains hidden or 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
| name: "Integration test" | |
| # NOTE: This runs all integration tests, including some that download data. | |
| # It will not automatically run integration tests (some of which require auth) | |
| # on PRs from forks. | |
| on: | |
| pull_request: | |
| branches: | |
| - "main" # Release PRs | |
| - "development" # Feature PRs | |
| push: | |
| branches: | |
| - "main" # Releases | |
| - "development" # Feature PR merges | |
| # When this workflow is queued, automatically cancel any previous running | |
| # or pending jobs from the same branch | |
| concurrency: | |
| group: "integration-tests-${{ github.ref }}" | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: "Integration test" | |
| runs-on: "ubuntu-latest" | |
| steps: | |
| - name: "Fetch user permission" | |
| id: "permission" | |
| uses: "actions-cool/check-user-permission@7b90a27f92f3961b368376107661682c441f6103" # v2.3.0 | |
| with: | |
| require: "write" | |
| username: "${{ github.triggering_actor }}" | |
| - name: "Check user permission" | |
| if: "${{ 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 | |
| # will need to make sure the PR looks safe, and if so, manually re-run the | |
| # failed pull_request_target jobs. | |
| run: | | |
| echo "User **${{ github.triggering_actor }}** does not have permission to run integration tests." >> $GITHUB_STEP_SUMMARY | |
| echo "A maintainer must perform a security review and re-run this build, if the code is safe." >> $GITHUB_STEP_SUMMARY | |
| echo "See [Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/resources/github-actions-preventing-pwn-requests)." >> $GITHUB_STEP_SUMMARY | |
| exit 1 | |
| - name: "Checkout source" | |
| uses: "actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8" # v5.0.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0 | |
| with: | |
| python-version: "3.12" | |
| - name: "Install package and test dependencies" | |
| run: | | |
| python -m pip install . | |
| python -m pip install -r requirements-dev.txt | |
| - name: "Run integration tests" | |
| env: | |
| EARTHDATA_USERNAME: "icepyx_devteam" | |
| EARTHDATA_PASSWORD: "${{ secrets.EARTHDATA_PASSWORD }}" | |
| NSIDC_LOGIN: "${{ secrets.EARTHDATA_PASSWORD }}" | |
| run: | | |
| pytest -s icepyx/tests/integration --verbose --cov app | |
| # Only run tests that [do not] download data | |
| # pytest icepyx/tests/integration --verbose --cov app -m "[not] downloads_data" | |
| - name: "Upload coverage report" | |
| uses: "codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7" # v5.5.1 | |
| with: | |
| token: "${{ secrets.CODECOV_TOKEN }}" |