--- /dev/null
+name: CI
+on: [push, pull_request]
+env:
+ CI: true
+
+jobs:
+ test:
+ runs-on: ${{ matrix.os }}
+
+ strategy:
+ fail-fast: false
+ matrix:
+ python: [3.5, 3.6, 3.7]
+ os: [ubuntu-latest, macos-latest]
+
+ steps:
+ - name: Clone repository
+ uses: actions/checkout@v2
+
+ - name: Set up Python
+ uses: actions/setup-python@v1
+ with:
+ python-version: ${{ matrix.python }}
+ architecture: 'x64'
+
+ - name: Cache dependencies
+ uses: actions/cache@v1
+ with:
+ path: ~/miniconda3
+ key: ${{ runner.os }}-python-v${{ matrix.python }}-${{ hashFiles('ci/*.sh') }}-${{ hashFiles('.github/workflows/ci.yml') }}
+ restore-keys: ${{ runner.os }}-python-v${{ matrix.python }}-${{ hashFiles('ci/*.sh') }}-${{ hashFiles('.github/workflows/ci.yml') }}
+
+ - name: Install conda
+ env:
+ PYTHON_VERSION: ${{ matrix.python }}
+ run: |
+ export PATH="$HOME/miniconda3/bin:$PATH"
+ ci/install_conda.sh
+ ci/setup_conda_env.sh
+
+ - name: Run tests
+ run: |
+ export PATH="$HOME/miniconda3/bin:$PATH"
+ ci/test.sh
+ ci/lint.sh
+++ /dev/null
-notifications:
- email: false
-
-language: generic
-
-cache:
- directories:
- - $HOME/miniconda3
-
-before_cache:
- - rm -rf $HOME/miniconda3/pkgs/cache
- - rm -rf $HOME/miniconda3/envs/hosts
- - rm -rf $HOME/miniconda3/conda-meta/history
- - touch $HOME/miniconda3/conda-meta/history
-
-os:
- - linux
- - osx
-
-env:
- - PYTHON_VERSION="3.5"
- - PYTHON_VERSION="3.6"
- - PYTHON_VERSION="3.7"
-
-before_install:
- - export PATH="$HOME/miniconda3/bin:$PATH"
-
-install:
- - ci/install_conda.sh
- - ci/setup_conda_env.sh
-
-script:
- - ci/test.sh
- - ci/lint.sh
echo "Installing Miniconda..."
rm -rf "$HOME"/miniconda3 # Just in case...
- if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh
+ if [ "$(uname)" == "Darwin" ]; then
+ wget -nv https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh
else
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
+ wget -nv https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
fi
bash miniconda.sh -b -p "$HOME/miniconda3"
[](https://github.com/StevenBlack/hosts/blob/master/license.txt)
[](https://github.com/StevenBlack/hosts)
[](https://github.com/StevenBlack/hosts/graphs/contributors)
-[](https://travis-ci.org/StevenBlack/hosts)
+[](https://github.com/StevenBlack/hosts/actions?workflow=CI)
[](https://github.com/python/black)
[](https://github.com/StevenBlack/hosts/commits/master)
[](https://github.com/StevenBlack/hosts/commits/master)