11name : CI
2-
32on :
43 push :
54 branches :
65 - main
76 pull_request :
8-
97jobs :
10-
118 dist :
129 runs-on : ubuntu-latest
1310 steps :
1411 - uses : actions/checkout@v6
15- - uses : actions/setup-python@v6
12+ - uses : astral-sh/setup-uv@v7
13+ - run : uvx --from build pyproject-build --sdist --wheel
14+ - run : uvx twine check dist/*
15+ - uses : actions/upload-artifact@v6
1616 with :
17- python-version : " 3.x"
18- - run : python -m pip install --upgrade pip build wheel twine
19- - run : python -m build --sdist --wheel
20- - run : python -m twine check dist/*
21-
17+ path : dist/*
2218 js-lint :
2319 runs-on : ubuntu-latest
2420 steps :
2925 - name : Install Node dependencies
3026 run : npm ci
3127 - run : npm run lint:js
32-
33-
3428 js-test :
3529 runs-on : ubuntu-latest
3630 needs :
4842 token : ${{ secrets.CODECOV_TOKEN }}
4943 flags : javascript
5044 file : lcov.txt
51-
52- py-lint :
53- runs-on : ubuntu-latest
54- strategy :
55- matrix :
56- lint-command :
57- - bandit -r . -x ./tests
58- - black --check --diff .
59- - flake8 .
60- - isort --check-only --diff .
61- - pydocstyle .
62- steps :
63- - uses : actions/checkout@v6
64- - uses : actions/setup-python@v6
65- with :
66- python-version : " 3.x"
67- cache : ' pip'
68- cache-dependency-path : ' linter-requirements.txt'
69- - run : python -m pip install -r linter-requirements.txt
70- - run : ${{ matrix.lint-command }}
71-
7245 pytest :
7346 needs :
74- - py-lint
7547 - dist
7648 runs-on : ubuntu-latest
7749 strategy :
@@ -85,91 +57,28 @@ jobs:
8557 - " 5.0"
8658 - " 5.1"
8759 steps :
88- - uses : actions/checkout@v6
89- - name : Set up Python ${{ matrix.python-version }}
90- uses : actions/setup-python@v6
91- with :
92- python-version : ${{ matrix.python-version }}
93-
94- - name : Install Chrome
95- run : |
96- sudo apt update
97- sudo apt install -y google-chrome-stable
98- - name : Install Selenium
99- run : |
100- mkdir bin
101- curl -qO "https://chromedriver.storage.googleapis.com/$(curl -q https://chromedriver.storage.googleapis.com/LATEST_RELEASE)/chromedriver_linux64.zip"
102- unzip chromedriver_linux64.zip -d bin
103-
104- - run : python -m pip install .[test]
105- - run : python -m pip install django~=${{ matrix.django-version }}.0
106- - run : python -m pytest -m "not selenium"
107- env :
108- PATH : $PATH:$(pwd)/bin
109- - uses : codecov/codecov-action@v5
110- with :
111- token : ${{ secrets.CODECOV_TOKEN }}
112- flags : python
113-
114-
60+ - uses : actions/checkout@v6
61+ - uses : astral-sh/setup-uv@v7
62+ with :
63+ python-version : ${{ matrix.python-version }}
64+ - run : uv run --with django~=${{ matrix.django-version }}.0 pytest -m "not selenium"
65+ - uses : codecov/codecov-action@v5
66+ with :
67+ token : ${{ secrets.CODECOV_TOKEN }}
68+ flags : python
11569 selenium :
11670 needs :
11771 - pytest
118- strategy :
119- matrix :
120- python-version :
121- - " 3.x"
12272 runs-on : ubuntu-latest
12373 steps :
12474 - uses : actions/checkout@v6
125- - name : Install Chrome
126- run : sudo apt-get install -y google-chrome-stable
12775 - name : Install Selenium
12876 run : |
129- mkdir bin
130- curl -O https://chromedriver.storage.googleapis.com/`curl -s https://chromedriver.storage.googleapis.com/LATEST_RELEASE`/chromedriver_linux64.zip
131- unzip chromedriver_linux64.zip -d bin
132- - uses : actions/setup-python@v6
133- with :
134- python-version : ${{ matrix.python-version }}
135- - run : python -m pip install -e .[test]
136- - run : python -m pytest -m selenium
77+ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
78+ sudo dpkg -i google-chrome-stable_current_amd64.deb || sudo apt-get -f install -y
79+ - uses : astral-sh/setup-uv@v7
80+ - run : uv run pytest -m selenium
13781 - uses : codecov/codecov-action@v5
13882 with :
13983 token : ${{ secrets.CODECOV_TOKEN }}
14084 flags : selenium
141-
142-
143- analyze :
144- name : CodeQL Analyze
145- needs :
146- - pytest
147- runs-on : ubuntu-latest
148- permissions :
149- actions : read
150- contents : read
151- security-events : write
152-
153- strategy :
154- fail-fast : false
155- matrix :
156- language : [ javascript, python ]
157-
158- steps :
159- - name : Checkout
160- uses : actions/checkout@v6
161-
162- - name : Initialize CodeQL
163- uses : github/codeql-action/init@v4
164- with :
165- languages : ${{ matrix.language }}
166- queries : +security-and-quality
167-
168- - name : Autobuild
169- uses : github/codeql-action/autobuild@v4
170- if : ${{ matrix.language == 'javascript' || matrix.language == 'python' }}
171-
172- - name : Perform CodeQL Analysis
173- uses : github/codeql-action/analyze@v4
174- with :
175- category : " /language:${{ matrix.language }}"
0 commit comments