-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (48 loc) · 1.41 KB
/
ci.yaml
File metadata and controls
48 lines (48 loc) · 1.41 KB
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": Run tests
"on":
"push":
"branches":
- main
"pull_request":
"branches":
- main
"workflow_dispatch":
"jobs":
"test":
"runs-on": ubuntu-latest
"strategy":
"fail-fast": false
"matrix":
"config":
- {'pandas_install_string':'pandas>=2'}
- {'pandas_install_string':'pandas>=1.5,<2'}
"steps":
- "name": Checkout
"uses": actions/checkout@v3
- "name": Set up Python
"uses": actions/setup-python@v4
"with":
"python-version": 3.11.1
- "name": poetry cache
"uses": actions/cache@v3
"with":
"path": ~/.cache/pypoetry
"key": ${{ runner.os }}-poetry
- "name": pre-commit-cache
"uses": actions/cache@v3
"with":
"path": ~/.cache/pre-commit
"key": ${{ runner.os }}-venv-${{ hashFiles('.pre-commit-config.yaml') }}
- "name": Set up the environment
"run": |
pip install -U pip
pip install poetry>=1.1.11
poetry build -f sdist
export version=$(sed -n -r "s/^version = \"([^\"]*)\"/\1/p" pyproject.toml)
pip install "dist/pidge-$version.tar.gz" "${{ matrix.config.pandas_install_string}}" pytest pytest-cov pre-commit
- "name": Run pre-commit hooks
"run": |
pre-commit install
pre-commit run --all-files
- "name": Run Tests
"run": pytest -v --pyargs --cov pidge --cov-fail-under 80