-
-
Notifications
You must be signed in to change notification settings - Fork 91
46 lines (46 loc) · 1.32 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
name: PyCI
on:
pull_request:
push:
branches:
- 'main'
- 'release-**'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Check if Git LFS is working"
run: '[ $(stat -c%s "pigar/.db.sqlite3") -gt $((1024 * 1024)) ] || { echo "File is not larger than 1MiB"; exit 1; }'
- name: Upgrade pip
run: pip install --upgrade pip
- name: Run tests with requirements.txt
run: |
python -m venv venv-requirements-txt
source venv-requirements-txt/bin/activate
pip install -r requirements/py${{ matrix.python-version }}.txt
python -m unittest discover pigar/tests/ -t . -v
- name: Run tests with pip install -e
run: |
python -m venv venv-pip-e
source venv-pip-e/bin/activate
pip install -e .
python -m unittest discover pigar/tests/ -t . -v
pigar --version