From 9d5b4f7be6b9beef9252d756586252587e22ee33 Mon Sep 17 00:00:00 2001 From: wboykinm Date: Mon, 16 Dec 2024 14:08:26 -0500 Subject: [PATCH] Travis CI --> GHA --- .github/workflows/test.yml | 39 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 29 ---------------------------- README.md | 3 --- requirements-dev.txt | 1 - 4 files changed, 39 insertions(+), 33 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..b957828 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,39 @@ +name: rio-color test + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + test: + runs-on: ubuntu-latest + + permissions: + id-token: write + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.9 + + - name: Install dependencies + run: | + python -m pip install -U pip + python -m pip install -r requirements.txt -r requirements-dev.txt + + - name: Install module + run: python -m pip install -e . + + - name: Run tests + run: | + pre-commit run --all-files + python -m pytest --cov rio_color --cov-report term-missing diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 955caec..0000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: python - -sudo: false - -cache: - directories: - - ~/.cache/pip - -env: - global: - - PIP_WHEEL_DIR=$HOME/.cache/pip/wheels - - PIP_FIND_LINKS=file://$HOME/.cache/pip/wheels - -python: - - "3.9" - -before_install: - - pip install -U pip - - pip install -r requirements-dev.txt - -install: - - pip install -e .[test] - -script: - - if [[ $TRAVIS_PYTHON_VERSION == 3.9 ]]; then pre-commit run --all-files; fi - - python -m pytest --cov rio_color --cov-report term-missing - -after_success: - - coveralls diff --git a/README.md b/README.md index f5a85d2..73df1e1 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,5 @@ # rio-color -[![Build Status](https://travis-ci.com/mapbox/rio-color.svg?branch=master)](https://travis-ci.com/mapbox/rio-color) -[![Coverage Status](https://coveralls.io/repos/mapbox/rio-color/badge.svg?branch=master&service=github)](https://coveralls.io/github/mapbox/rio-color?branch=master) - A rasterio plugin for applying basic color-oriented image operations to geospatial rasters. ## Goals diff --git a/requirements-dev.txt b/requirements-dev.txt index 00df0b8..eb6b16b 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,7 +1,6 @@ affine cligj colormath==3.0.0 -coveralls>=0.4 delocate numpy==1.26.0 pre-commit