mirror of
https://github.com/StevenBlack/hosts.git
synced 2026-09-27 22:05:51 +01:00
46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
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, 3.8]
|
|
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/lint.sh
|
|
ci/test.sh
|