-
Notifications
You must be signed in to change notification settings - Fork 3
36 lines (35 loc) · 1.09 KB
/
ci-tests-drafts.yaml
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
name: Continuous Integration Tests Draft PR (pytest)
# This duplicate ci workflow is required so the badge in the README.md is not effected by draft PRs
on:
pull_request:
branches:
- main
jobs:
build:
if: github.event.pull_request.draft == true
name: Ex1 (${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -e .[test]
pip install pytest pytest-cov
- name: Test with pytest
run: |
pytest --cov=causal_testing --cov-report=xml
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}