Files
hosts/.github/workflows/ci.yml
T
XhmikosR eb4d002f13 Update CI config
* update to `actions/cache@v2`
* change cache key to take into account requirements.txt
2020-06-07 21:29:06 +03:00

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@v2
with:
path: ~/miniconda3
key: ${{ runner.os }}-python-v${{ matrix.python }}-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('ci/*.sh') }}
restore-keys: ${{ runner.os }}-python-v${{ matrix.python }}-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('ci/*.sh') }}
- 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