Skip to content

Commit 4bfbd23

Browse files
committed
chore: update ci rules
1 parent e8be9f2 commit 4bfbd23

1 file changed

Lines changed: 73 additions & 90 deletions

File tree

.github/workflows/test.yml

Lines changed: 73 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -2,107 +2,90 @@ name: Tests
22

33
on:
44
push:
5-
branches: [ main, master ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main, master ]
7+
branches: [main]
88

99
jobs:
10-
test-unit:
10+
test:
1111
runs-on: ${{ matrix.os }}
1212
strategy:
1313
fail-fast: false
1414
matrix:
1515
os: [ubuntu-latest, macos-latest, windows-latest]
16-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
16+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
1717

1818
steps:
19-
- uses: actions/checkout@v5
20-
21-
- name: Set up Python ${{ matrix.python-version }}
22-
uses: actions/setup-python@v5
23-
with:
24-
python-version: ${{ matrix.python-version }}
25-
26-
- name: Install dependencies
27-
run: |
28-
python -m pip install --upgrade pip
29-
pip install -e .
30-
pip install -r requirements-test.txt
31-
32-
- name: Run unit tests
33-
run: |
34-
pytest tests/test_plugin.py tests/test_utils.py tests/test_cli.py tests/test_integration.py tests/test_dash_simple.py
35-
36-
test-browser:
37-
runs-on: ${{ matrix.os }}
38-
strategy:
39-
fail-fast: false
40-
matrix:
41-
os: [ubuntu-latest, macos-latest, windows-latest]
42-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
43-
44-
steps:
45-
- uses: actions/checkout@v5
46-
47-
- name: Set up Python ${{ matrix.python-version }}
48-
uses: actions/setup-python@v5
49-
with:
50-
python-version: ${{ matrix.python-version }}
51-
52-
- name: Install dependencies
53-
run: |
54-
python -m pip install --upgrade pip
55-
pip install -e .
56-
pip install -r requirements-test.txt
57-
58-
- name: Install browser for testing (Ubuntu)
59-
if: matrix.os == 'ubuntu-latest'
60-
run: |
61-
sudo apt-get update
62-
sudo apt-get install -y chromium-browser chromium-chromedriver xvfb
63-
64-
- name: Install browser for testing (macOS)
65-
if: matrix.os == 'macos-latest'
66-
run: |
67-
brew install --cask chromium chromedriver
68-
69-
- name: Install browser for testing (Windows)
70-
if: matrix.os == 'windows-latest'
71-
run: |
72-
choco install chromium chromedriver
73-
74-
- name: Start virtual display (Ubuntu)
75-
if: matrix.os == 'ubuntu-latest'
76-
run: |
77-
export DISPLAY=:99
78-
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
79-
80-
- name: Run browser tests
81-
run: |
82-
pytest tests/test_dash_callbacks.py tests/test_dash_integration.py
83-
env:
84-
DISPLAY: :99
19+
- uses: actions/checkout@v5
20+
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install -e .
30+
pip install -r requirements-dev.txt
31+
32+
- name: Install browser for testing (Ubuntu)
33+
if: matrix.os == 'ubuntu-latest'
34+
run: |
35+
sudo apt-get update
36+
sudo apt-get install -y chromium-browser chromium-chromedriver xvfb
37+
38+
- name: Install browser for testing (macOS)
39+
if: matrix.os == 'macos-latest'
40+
run: |
41+
brew install --cask chromium chromedriver
42+
43+
- name: Install browser for testing (Windows)
44+
if: matrix.os == 'windows-latest'
45+
run: |
46+
choco install chromium chromedriver
47+
48+
- name: Start virtual display (Ubuntu)
49+
if: matrix.os == 'ubuntu-latest'
50+
run: |
51+
export DISPLAY=:99
52+
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
53+
54+
- name: Run tests
55+
run: |
56+
python -m pytest tests/ -v --cov=dash_tailwindcss_plugin --cov-report=xml
57+
env:
58+
DISPLAY: :99
59+
60+
- name: Upload coverage to Codecov
61+
uses: codecov/codecov-action@v5
62+
env:
63+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
64+
with:
65+
file: ./coverage.xml
66+
flags: unittests
67+
name: codecov-umbrella
8568

8669
lint-format:
8770
runs-on: ubuntu-latest
8871
steps:
89-
- uses: actions/checkout@v5
90-
91-
- name: Set up Python
92-
uses: actions/setup-python@v5
93-
with:
94-
python-version: "3.10"
95-
96-
- name: Install dependencies
97-
run: |
98-
python -m pip install --upgrade pip
99-
pip install -e .
100-
pip install ruff
101-
102-
- name: Run linting
103-
run: |
104-
ruff check .
105-
106-
- name: Run format check
107-
run: |
108-
ruff format . --check
72+
- uses: actions/checkout@v5
73+
74+
- name: Set up Python
75+
uses: actions/setup-python@v5
76+
with:
77+
python-version: "3.10"
78+
79+
- name: Install dependencies
80+
run: |
81+
python -m pip install --upgrade pip
82+
pip install -e .
83+
pip install ruff
84+
85+
- name: Run linting
86+
run: |
87+
ruff check .
88+
89+
- name: Run format check
90+
run: |
91+
ruff format . --check

0 commit comments

Comments
 (0)