From 538db9d5414617e33f1929c7f002eee807af6dd6 Mon Sep 17 00:00:00 2001 From: Russell Kan Date: Tue, 19 Mar 2024 20:52:30 -0700 Subject: [PATCH] Add GitHub Actions CI workflow - Update requests package version - Add tox to requirements.txt - Remove Travis CI config file and status badge in README --- .github/workflows/CI.yml | 27 +++++++++++++++++++++++++++ .github/workflows/publish-to-pypi.yml | 1 + .travis.yml | 13 ------------- README.md | 2 +- pyproject.toml | 1 + requirements.txt | 3 ++- 6 files changed, 32 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/CI.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..375e7ce --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,27 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + +env: + PYTHON_VERSION: '3.7' + +jobs: + run-tox: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ env.PYTHON_VERSION }} + uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + cache: 'pip' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Run tox + run: tox diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 8198e76..c15b34f 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -4,6 +4,7 @@ on: push: tags: - v* + env: PYTHON_VERSION: '3.7' diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 260973b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -sudo: false -language: python -python: - - "3.7" -before_install: -- deactivate -- pyenv global 3.7.1 -- python3.7 -m pip install -U tox --user -install: -- python3.7 -m tox --notest -script: python3.7 -m tox -notifications: - email: false diff --git a/README.md b/README.md index d71f32b..5ea97c8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Travis CI build status](https://img.shields.io/travis/innolitics/dicom-standard?label=Travis%20CI&logo=travis)](https://travis-ci.org/innolitics/dicom-standard) +[![CI workflow status](https://github.com/innolitics/dicom-standard/workflows/CI/badge.svg)](https://github.com/innolitics/dicom-standard/actions?query=workflow%3ACI) [![update-standard workflow status](https://github.com/innolitics/dicom-standard/workflows/update-standard/badge.svg)](https://github.com/innolitics/dicom-standard/actions?query=workflow%3Aupdate-standard) [![PyPI version](https://img.shields.io/pypi/v/dicom-standard?label=PyPI&color=blue&logo=pypi)](https://pypi.org/project/dicom-standard/) diff --git a/pyproject.toml b/pyproject.toml index ca3db64..f17d32c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,6 +21,7 @@ commands = flake8 [testenv:mypy] deps = mypy commands = + pip install types-requests mypy -p dicom_standard mypy -p tests diff --git a/requirements.txt b/requirements.txt index 7d9b9d9..deff4f9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ beautifulsoup4==4.5.1 py==1.10.0 pytest==3.0.5 -requests==2.23.0 +requests==2.31.0 +tox==4.8.0