From 99ad399b15fd753ff2f6904774ff5ba473373c59 Mon Sep 17 00:00:00 2001 From: Scott Staniewicz Date: Tue, 29 Apr 2025 16:44:19 -0400 Subject: [PATCH] Switch from circleci to Github Actions --- .circleci/config.yml | 34 ---------------- .github/ISSUE_TEMPLATE/dependabot.yml | 7 ++++ .github/ISSUE_TEMPLATE/release.yml | 5 +++ .github/ISSUE_TEMPLATE/workflows/ci.yml | 52 +++++++++++++++++++++++++ 4 files changed, 64 insertions(+), 34 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/ISSUE_TEMPLATE/dependabot.yml create mode 100644 .github/ISSUE_TEMPLATE/release.yml create mode 100644 .github/ISSUE_TEMPLATE/workflows/ci.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index e0e95cdb..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,34 +0,0 @@ -version: 2.1 - -jobs: - build: - docker: - - image: continuumio/miniconda3 - steps: - - checkout - - run: - name: "Install dependencies" - command: | - conda install -y --file .circleci/specfile.txt - - run: - name: "Build s1reader python package" - command: | - python3 -m build --sdist --wheel . - #- run: - # name: "Download S1 test data" - # command: | - # python3 tests/download_data.py - - run: - name: "Install s1reader python package" - command: | - python3 -m pip install . - - run: - name: "Run unit tests" - command: | - python -m pip install pytest-recording - python3 -m pytest - -workflows: - build-workflow: - jobs: - - build diff --git a/.github/ISSUE_TEMPLATE/dependabot.yml b/.github/ISSUE_TEMPLATE/dependabot.yml new file mode 100644 index 00000000..6fddca0d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: + # Maintain dependencies for GitHub Actions + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/ISSUE_TEMPLATE/release.yml b/.github/ISSUE_TEMPLATE/release.yml new file mode 100644 index 00000000..9d1e0987 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/release.yml @@ -0,0 +1,5 @@ +changelog: + exclude: + authors: + - dependabot + - pre-commit-ci diff --git a/.github/ISSUE_TEMPLATE/workflows/ci.yml b/.github/ISSUE_TEMPLATE/workflows/ci.yml new file mode 100644 index 00000000..1d8b0658 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/workflows/ci.yml @@ -0,0 +1,52 @@ +name: CI + +on: [pull_request, push] + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref }} + cancel-in-progress: true + +env: + # https://github.com/pytest-dev/pytest/issues/2042#issuecomment-429289164 + PY_IGNORE_IMPORTMISMATCH: 1 + +jobs: + pytest: + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + deps: + - label: Latest + spec: >- + gdal + - label: Minimum + spec: >- + python=3.9 + gdal=3.5 + + fail-fast: false + name: ${{ matrix.os }} • ${{ matrix.deps.label }} + runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash -l {0} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup environment + uses: mamba-org/setup-micromamba@v2 + with: + environment-file: environment.yaml + environment-name: s1-reader-env + generate-run-shell: false + create-args: ${{ matrix.deps.spec }} + condarc: | + channels: + - conda-forge + - name: Install + run: | + python -m pip install . + - name: Test + run: | + python -m pip install pytest-recording + python -m pytest -n0