Skip to content

Commit

Permalink
Add Python 3.12 to test matrix
Browse files Browse the repository at this point in the history
Fixes #457
  • Loading branch information
chuckwondo committed May 13, 2024
1 parent 43fd711 commit 919c57b
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 17 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,16 @@ concurrency:
group: integration-tests-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash -l {0}

jobs:
test:
integration-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
fail-fast: false

steps:
Expand All @@ -35,17 +39,17 @@ jobs:
id: full-python-version
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
- name: Install poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
uses: abatilo/actions-poetry@v3
- name: Configure poetry
run: poetry config virtualenvs.in-project true
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- name: Set up cache
uses: actions/cache@v4
id: cache
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('poetry.lock') }}
- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
Expand All @@ -59,4 +63,6 @@ jobs:
EARTHACCESS_TEST_PASSWORD: ${{ secrets.EDL_PASSWORD }}
run: poetry run bash scripts/integration-test.sh
- name: Upload coverage
# Don't upload coverage when using the `act` tool to run the workflow locally
if: ${{ !env.ACT }}
uses: codecov/codecov-action@v4
20 changes: 13 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ on:
pull_request:
types: [opened, synchronize]

defaults:
run:
shell: bash -l {0}

jobs:
test:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
fail-fast: false

steps:
Expand All @@ -23,17 +27,17 @@ jobs:
id: full-python-version
run: echo "version=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")" >> $GITHUB_OUTPUT
- name: Install poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
uses: abatilo/actions-poetry@v3
- name: Configure poetry
run: poetry config virtualenvs.in-project true
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- name: Set up cache
uses: actions/cache@v4
id: cache
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('poetry.lock') }}
- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
Expand All @@ -42,4 +46,6 @@ jobs:
- name: Test
run: poetry run bash scripts/test.sh
- name: Upload coverage
# Don't upload coverage when using the `act` tool to run the workflow locally
if: ${{ !env.ACT }}
uses: codecov/codecov-action@v4
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@
* [#421](https://github.com/nsidc/earthaccess/issues/421): Enabled queries to
Earthdata User Acceptance Testing (UAT) system for authenticated accounts.
* [#562](https://github.com/nsidc/earthaccess/issues/562): The destination
path is now created prior to direct S3 downloads, if it doesn't already
exist.
path is now created prior to direct S3 downloads, if it doesn't already
exist.
* [#457](https://github.com/nsidc/earthaccess/issues/457): Add Python 3.12 to
automated test matrix.

## [v0.9.0] 2024-02-28

Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ maintainers = [
"Luis Lopez <[email protected]>",
"Joseph H. Kennedy <[email protected]>",
"James Bourbeau <[email protected]>",
"Matt Fisher <[email protected]>"
"Matt Fisher <[email protected]>",
"Chuck Daniels <[email protected]>"
]
license = "MIT"
readme = "README.md"
Expand All @@ -24,6 +25,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development",
"License :: OSI Approved :: MIT License",
Expand Down

0 comments on commit 919c57b

Please sign in to comment.