From 31588a72e5f4db4429e501c2744428bf30dd3be7 Mon Sep 17 00:00:00 2001 From: Brian Blaylock Date: Thu, 14 Dec 2023 19:59:27 -0800 Subject: [PATCH] update --- .github/workflows/black.yml | 2 +- .github/workflows/python-package-conda.yml | 6 +-- .github/workflows/release_to_pypi.yml | 2 +- .github/workflows/tests-conda.yml | 2 +- .github/workflows/tests-python.yml | 63 +++++++++++----------- 5 files changed, 37 insertions(+), 38 deletions(-) diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml index b04fb15c..81e6a948 100644 --- a/.github/workflows/black.yml +++ b/.github/workflows/black.yml @@ -6,5 +6,5 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: psf/black@stable diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index d87b46ad..1841f3e8 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -4,7 +4,7 @@ on: #push: # branches: [master] pull_request: - branches: [master] + branches: [main] jobs: build-linux: @@ -12,10 +12,10 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v3 with: diff --git a/.github/workflows/release_to_pypi.yml b/.github/workflows/release_to_pypi.yml index 72dbe7d5..1c699751 100644 --- a/.github/workflows/release_to_pypi.yml +++ b/.github/workflows/release_to_pypi.yml @@ -15,7 +15,7 @@ jobs: steps: - name: Checkout source - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v3 diff --git a/.github/workflows/tests-conda.yml b/.github/workflows/tests-conda.yml index 743ff98d..1a15a094 100644 --- a/.github/workflows/tests-conda.yml +++ b/.github/workflows/tests-conda.yml @@ -35,7 +35,7 @@ jobs: steps: - name: Acquire sources - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 2 diff --git a/.github/workflows/tests-python.yml b/.github/workflows/tests-python.yml index 830d25ec..436fe6b6 100644 --- a/.github/workflows/tests-python.yml +++ b/.github/workflows/tests-python.yml @@ -2,9 +2,9 @@ name: Tests (Python) on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] # Allow job to be triggered manually. workflow_dispatch: @@ -21,7 +21,7 @@ jobs: fail-fast: true matrix: os: ["ubuntu-latest"] - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.12"] # In order to save resources, only run particular # matrix slots on other OS than Linux. include: @@ -40,37 +40,36 @@ jobs: name: Python ${{ matrix.python-version }} on OS ${{ matrix.os }} steps: + - name: Acquire sources + uses: actions/checkout@v4 + with: + fetch-depth: 2 - - name: Acquire sources - uses: actions/checkout@v3 - with: - fetch-depth: 2 + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + architecture: x64 + cache: "pip" + cache-dependency-path: "setup.cfg" - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - architecture: x64 - cache: 'pip' - cache-dependency-path: 'setup.cfg' + - name: Install prerequisites (Linux) + if: runner.os == 'Linux' + run: | + sudo apt -y install libgeos-dev libeccodes-dev - - name: Install prerequisites (Linux) - if: runner.os == 'Linux' - run: | - sudo apt -y install libgeos-dev libeccodes-dev + - name: Install prerequisites (macOS) + if: runner.os == 'macOS' + run: | + brew install pkg-config geos eccodes - - name: Install prerequisites (macOS) - if: runner.os == 'macOS' - run: | - brew install pkg-config geos eccodes + - name: Install project + run: | + pip3 install --requirement=requirements-test.txt + pip3 install --editable=. - - name: Install project - run: | - pip3 install --requirement=requirements-test.txt - pip3 install --editable=. - - - name: Run tests - env: - TMPDIR: ${{ runner.temp }} - run: | - pytest + - name: Run tests + env: + TMPDIR: ${{ runner.temp }} + run: | + pytest