-
Notifications
You must be signed in to change notification settings - Fork 174
40 lines (40 loc) · 1.04 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
name: Workflow for CI and Codecov Action
on: [push, pull_request]
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
env:
OS: ${{ matrix.os }}
PYTHON: "3.10"
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install pdoc3
pip install pytest
pip install pytest-cov
pip install -e .
- name: Update documentation
run: |
pdoc -o ./html pearl
- name: Generate coverage report
run: |
pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
if: success() || failure()
uses: codecov/codecov-action@v4
with:
env_vars: OS,PYTHON
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
token: ${{ secrets.CODECOV_TOKEN }}
slug: facebookresearch/Pearl
verbose: true