-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use nox for our GitHub Actions workflows (#872)
Co-authored-by: Chuck Daniels <[email protected]>
- Loading branch information
1 parent
50bf0b9
commit d4f24df
Showing
9 changed files
with
102 additions
and
88 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -94,16 +94,21 @@ jobs: | |
# this point. | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: Install package with dependencies | ||
uses: ./.github/actions/install-pkg | ||
- name: Install uv | ||
uses: astral-sh/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
enable-cache: true | ||
|
||
- name: Setup nox | ||
uses: wntrblm/[email protected] | ||
with: | ||
python-versions: ${{ matrix.python-version }} | ||
|
||
- name: Run integration tests | ||
env: | ||
EARTHDATA_USERNAME: ${{ secrets.EDL_USERNAME }} | ||
EARTHDATA_PASSWORD: ${{ secrets.EDL_PASSWORD }} | ||
run: ./scripts/integration-test.sh | ||
run: nox -s integration-tests -- --cov=earthaccess --cov-report=term-missing --capture=no --tb=native --log-cli-level=INFO | ||
|
||
- name: Upload coverage report | ||
# Don't upload coverage when using the `act` tool to run the workflow locally | ||
|
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 |
---|---|---|
|
@@ -22,24 +22,17 @@ jobs: | |
uses: actions/[email protected] | ||
|
||
- name: Install uv | ||
uses: astral-sh/setup-uv@v3 | ||
uses: astral-sh/setup-uv@v3.2.2 | ||
with: | ||
version: "0.4.7" | ||
enable-cache: true | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
- name: Setup nox | ||
uses: wntrblm/[email protected] | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install minimum-compatible dependencies | ||
run: uv sync --resolution lowest-direct --extra test | ||
|
||
- name: Install earthaccess | ||
run: uv pip install --no-deps . | ||
python-versions: 3.9 | ||
|
||
- name: Test | ||
run: uv run pytest tests/unit --cov=earthaccess --cov=tests --cov-report=term-missing --capture=no --tb=native --log-cli-level=INFO | ||
run: nox -s test-min-deps -- --verbose --cov=earthaccess --cov-report=term-missing --capture=no --tb=native --log-cli-level=INFO | ||
|
||
- name: Upload coverage | ||
# Don't upload coverage when using the `act` tool to run the workflow locally | ||
|
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 |
---|---|---|
|
@@ -19,15 +19,21 @@ jobs: | |
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- uses: ./.github/actions/install-pkg | ||
- name: Install uv | ||
uses: astral-sh/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
enable-cache: true | ||
|
||
- name: Setup nox | ||
uses: wntrblm/[email protected] | ||
with: | ||
python-versions: ${{ matrix.python-version }} | ||
|
||
- name: Typecheck | ||
run: mypy | ||
run: nox -s typecheck | ||
|
||
- name: Test | ||
run: pytest tests/unit --verbose --cov=earthaccess --cov-report=term-missing --capture=no --tb=native --log-cli-level=INFO | ||
run: nox -s tests -- --verbose --cov=earthaccess --cov-report=term-missing --capture=no --tb=native --log-cli-level=INFO | ||
|
||
- name: Upload coverage | ||
# Don't upload coverage when using the `act` tool to run the workflow locally | ||
|
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
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 was deleted.
Oops, something went wrong.
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