summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarrod Millman <jarrod.millman@gmail.com>2020-09-10 13:59:26 -0700
committerGitHub <noreply@github.com>2020-09-10 13:59:26 -0700
commit3c35f236d67e564f81c354947fd3a0640067b889 (patch)
tree28397a2bd7c2511c89eeaffc1e86bb01d3861ca7
parent2bfdee687d0db533555384f92ce3670d47c45aec (diff)
downloadnetworkx-3c35f236d67e564f81c354947fd3a0640067b889.tar.gz
Test mac osx via actions (#4201)
-rw-r--r--.github/workflows/testing.yml37
-rw-r--r--.travis.yml20
-rwxr-xr-xtools/travis/osx_install.sh22
3 files changed, 38 insertions, 41 deletions
diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml
new file mode 100644
index 00000000..3032d063
--- /dev/null
+++ b/.github/workflows/testing.yml
@@ -0,0 +1,37 @@
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ test_macos:
+ name: macOS tests
+ runs-on: macos-latest
+ strategy:
+ max-parallel: 3
+ matrix:
+ python-version: [3.6, 3.7, 3.8]
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v1
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Before install
+ run: |
+ brew install graphviz
+ dot -V
+ python3 -m venv ~/venv
+ source ~/venv/bin/activate
+ - name: Install packages
+ run: |
+ pip install --upgrade pip wheel setuptools
+ pip install -r requirements.txt
+ pip install -r requirements/optional.txt
+ pip install pydot pygraphviz
+ pip install .
+ pip list
+ - name: Test NetworkX
+ run: |
+ pytest --doctest-modules --durations=10 --pyargs networkx
diff --git a/.travis.yml b/.travis.yml
index cbd35593..d0d9c58f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -42,20 +42,6 @@ matrix:
packages:
- libgdal-dev
- graphviz
- - os: osx
- osx_image: xcode12
- language: generic
- env:
- - TRAVIS_PYTHON_VERSION=3.7
- - OPTIONAL_DEPS=1
- - os: osx
- osx_image: xcode12
- language: generic
- env: TRAVIS_PYTHON_VERSION=3.6
- - os: osx
- osx_image: xcode12
- language: generic
- env: TRAVIS_PYTHON_VERSION=3.8
- python: 3.6
- python: 3.7
- python: 3.8
@@ -71,11 +57,7 @@ before_install:
- source tools/travis/before_install.sh
- uname -a
- printenv
- - if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
- source tools/travis/osx_install.sh;
- else
- source tools/travis/linux_install.sh;
- fi
+ - source tools/travis/linux_install.sh;
install:
# install required packages
diff --git a/tools/travis/osx_install.sh b/tools/travis/osx_install.sh
deleted file mode 100755
index 8fc5d3a9..00000000
--- a/tools/travis/osx_install.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env bash
-set -ex
-
-section "OSX install section"
-
-if [[ "${OPTIONAL_DEPS}" == 1 ]]; then
- brew install graphviz
- dot -V
-fi
-
-# set up Python and virtualenv on OSX
-git clone https://github.com/matthew-brett/multibuild
-source multibuild/osx_utils.sh
-get_macpython_environment $TRAVIS_PYTHON_VERSION venv
-
-if [[ "${OPTIONAL_DEPS}" == 1 ]]; then
- pip install gdal==3.1.2
-fi
-
-section_end "OSX install section"
-
-set +ex