diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 1cbf9811e..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,129 +0,0 @@ -version: 2.1 - -commands: - mac_install_python: - parameters: - python_version: - description: "version of python to install" - type: string - default: 3.7.10 - steps: - - run: | - brew update - python --version - sudo -H pip install --upgrade virtualenv - brew install pyenv - echo 'eval "$(pyenv init --path)"' >> ~/.bash_profile - echo 'eval "$(pyenv init -)"' >> ~/.bash_profile - source ~/.bash_profile - pyenv install --list - pyenv install << parameters.python_version >> - pyenv versions - pyenv global << parameters.python_version >> - python --version - - update_packaging_tools: - steps: - - run: | - python -m pip install --upgrade pip - - run: | - python -m pip install --upgrade setuptools wheel setuptools_scm build - - install_run_tests: - steps: - - run: | - python -m build -nwx . - python -m pip install --upgrade ./dist/*.whl - python -m pip install pytest - - run: pytest - -jobs: - mac_python_3_7: - shell: /bin/bash --login - macos: - xcode: '13.0.0' - steps: - - checkout - - mac_install_python: - python_version: "3.7.10" - - update_packaging_tools - - install_run_tests - - - mac_python_3_8: - shell: /bin/bash --login - macos: - xcode: '13.0.0' - steps: - - checkout - - mac_install_python: - python_version: "3.8.10" - - update_packaging_tools - - install_run_tests - - mac_python_3_9: - shell: /bin/bash --login - macos: - xcode: '13.0.0' - steps: - - checkout - - mac_install_python: - python_version: "3.9.5" - - update_packaging_tools - - install_run_tests - - mac_python_3_10: - shell: /bin/bash --login - macos: - xcode: '13.0.0' - steps: - - checkout - - mac_install_python: - python_version: "3.10.6" - - update_packaging_tools - - install_run_tests - - linux_python_3_7: - docker: - - image: python:3.7 - steps: - - checkout - - update_packaging_tools - - install_run_tests - - linux_python_3_8: - docker: - - image: python:3.8 - steps: - - checkout - - update_packaging_tools - - install_run_tests - - linux_python_3_9: - docker: - - image: python:3.9 - steps: - - checkout - - update_packaging_tools - - install_run_tests - - linux_python_3_10: - docker: - - image: python:3.10 - steps: - - checkout - - update_packaging_tools - - install_run_tests - -workflows: - version: 2 - python_matrix_build: - jobs: - - mac_python_3_7 - - mac_python_3_8 - - mac_python_3_9 - - mac_python_3_10 - - linux_python_3_7 - - linux_python_3_8 - - linux_python_3_9 - - linux_python_3_10 diff --git a/.github/workflows/install_and_test.yml b/.github/workflows/install_and_test.yml new file mode 100644 index 000000000..e5a6cc6e3 --- /dev/null +++ b/.github/workflows/install_and_test.yml @@ -0,0 +1,28 @@ +name: Install and Test + +on: [ push, workflow_dispatch, pull_request ] + +jobs: + install_and_test: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest, macos-latest, windows-latest ] + python-version: [ "3.7", "3.8", "3.9", "3.10" ] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Installation + run: | + python -m pip install --upgrade pip + python -m pip install --upgrade setuptools wheel setuptools_scm build + python -m build -nwx . + python -m pip install --upgrade ./dist/*.whl + python -m pip install pytest + shell: bash + - name: Run tests + run: pytest diff --git a/README.md b/README.md index e4a12ad49..e281354ac 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,11 @@ # Python library to parse, validate and create SPDX documents -| Linux | macOS | Windows | -|:-------------------------------|:------------------------------|:--------------------------------| -| [ ![Linux build status][1]][2] | [![macOS build status][3]][4] | [![Windows build status][5]][6] | +CI status (Linux, macOS and Windows): [![Install and Test][1]][2] -[1]: https://travis-ci.org/spdx/tools-python.svg?branch=master +[1]: https://github.com/spdx/tools-python/actions/workflows/install_and_test.yml/badge.svg -[2]: https://travis-ci.org/spdx/tools-python +[2]: https://github.com/spdx/tools-python/actions/workflows/install_and_test.yml -[3]: https://circleci.com/gh/spdx/tools-python/tree/master.svg?style=shield&circle-token=36cca2dfa3639886fc34e22d92495a6773bdae6d - -[4]: https://circleci.com/gh/spdx/tools-python/tree/master - -[5]: https://ci.appveyor.com/api/projects/status/0bf9glha2yg9x8ef/branch/master?svg=true - -[6]: https://ci.appveyor.com/project/spdx/tools-python/branch/master # CURRENT STATE