1+ ---
12name : CI
23
3- on :
4+ " on " :
45 push :
5- branches : [ master, main ]
6+ branches : [master, main]
67 pull_request :
7- branches : [ master, main ]
8+ branches : [master, main]
89
910jobs :
1011 test :
1112 runs-on : ubuntu-latest
1213 strategy :
1314 matrix :
14- python-version : ["3.8", "3. 9", "3.10", "3.11", "3.12"]
15+ python-version : ["3.9", "3.10", "3.11", "3.12"]
1516
1617 steps :
17- - uses : actions/checkout@v4
18-
19- - name : Set up Python ${{ matrix.python-version }}
20- uses : actions/setup-python@v5
21- with :
22- python-version : ${{ matrix.python-version }}
23-
24- - name : Install dependencies
25- run : |
26- python -m pip install --upgrade pip
27- pip install -e .
28- pip install ruff pytest
29-
30- - name : Run ruff format check
31- run : ruff format --check .
32-
33- - name : Run ruff lint
34- run : ruff check .
35-
36- - name : Run tests
37- run : |
38- # Run pytest if test files exist, otherwise just import the module
39- if [ -d "tests" ] || find . -name "*test*.py" -type f | grep -q .; then
40- pytest
41- else
42- python -c "import sphinxcontrib.googleanalytics; print('Module import successful')"
43- fi
18+ - uses : actions/checkout@v4
19+
20+ - name : Set up Python ${{ matrix.python-version }}
21+ uses : actions/setup-python@v5
22+ with :
23+ python-version : ${{ matrix.python-version }}
24+
25+ - name : Install dependencies
26+ run : |
27+ python -m pip install --upgrade pip
28+ pip install -e .
29+ pip install ruff pytest
30+
31+ - name : Run ruff format check
32+ run : ruff format --check .
33+
34+ - name : Run ruff lint
35+ run : ruff check .
36+
37+ - name : Run tests
38+ run : |
39+ # Run pytest if test files exist, otherwise just import the module
40+ if [ -d "tests" ] || find . -name "*test*.py" -type f | grep -q .; then
41+ pytest
42+ else
43+ python -c "import sphinxcontrib.googleanalytics; print('Module import successful')"
44+ fi
0 commit comments