Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,28 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu, windows, macos ]
python-version: ['3.10', 3.11]
include:
- python-version: '3.10'
node-version: 16
- python-version: 3.11
node-version: 18
- python-version: 3.11
node-version: 20
python-version: [ '3.10', 3.12, 3.14 ]
node-version: [ lts/*, lts/-1, lts-2 ]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Cached node_modules
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package*.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Make all (Windows)
if: matrix.os == 'windows'
if: runner.os == 'Windows'
run: make all
- name: Make CI (Non-windows)
if: matrix.os != 'windows'
if: runner.os != 'Windows'
run: make ci
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,17 @@ python/dist/*: $(BUILD_DIR)/python $(BUILD_DIR)/generate $(wildcard python/**/*.
@rm -f python/dist/*
@cd python && \
cp setup-css.py setup.py && \
$(PYTHON) -m pip install 'setuptools; python_version >= "3.12"' && \
$(PYTHON) setup.py sdist && \
rm setup.py
@cd python && \
cp setup-js.py setup.py && \
$(PYTHON) -m pip install 'setuptools; python_version >= "3.12"' && \
$(PYTHON) setup.py sdist && \
rm setup.py
# Order matters here! Install css then js to make sure the local dist version of js is used
$(SCRIPT_DIR)/python-rel pip install -U python/dist/cssbeautifier*
$(SCRIPT_DIR)/python-rel pip install -U python/dist/jsbeautifier*
$(SCRIPT_DIR)/python-rel pip install --upgrade python/dist/cssbeautifier*
$(SCRIPT_DIR)/python-rel pip install --upgrade python/dist/jsbeautifier*

# python package generation
build/*.tgz: js/lib/*.js
Expand Down
7 changes: 6 additions & 1 deletion python/setup-css.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
"cssbeautifier.tests.generated",
"cssbeautifier.css",
],
install_requires=["jsbeautifier", "six>=1.13.0", "editorconfig>=0.12.2"],
install_requires=[
"jsbeautifier",
"six>=1.13.0",
"editorconfig>=0.12.2",
"setuptools; python_version >= '3.12'",
],
license="MIT",
)
6 changes: 5 additions & 1 deletion python/setup-js.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
"jsbeautifier.unpackers",
"jsbeautifier.unpackers.tests",
],
install_requires=["six>=1.13.0", "editorconfig>=0.12.2"],
install_requires=[
"six>=1.13.0",
"editorconfig>=0.12.2",
"setuptools; python_version >= '3.12'",
],
license="MIT",
)