-
Notifications
You must be signed in to change notification settings - Fork 11
48 lines (45 loc) · 1.27 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: CI
on:
pull_request:
branches: [main]
# schedule:
# - cron: '0 0 * * 0' # weekly
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest]
python-version: [3.8]
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@main
with:
python-version: ${{ matrix.python-version }}
- name: Add conda to system path
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
eval "$(conda shell.bash hook)"
conda env create --file environment.yml
# - name: Build
# eval "$(conda shell.bash hook)"
# pip install -e .
- name: Test and generate coverage
run: |
eval "$(conda shell.bash hook)"
conda activate causeinfer-dev
export PYTHONPATH="./src"
pytest --cov=src tests --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true