diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5d1ebccb..e227b2e9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,23 +19,36 @@ jobs: - uses: actions/setup-python@v4 with: python-version: "3.10" - - name: Setup uv + - name: Setup dependencies + # Set up the virtual environment and install dev dependencies (JS & Python) run: | curl -LsSf https://astral.sh/uv/install.sh | sh uv venv + source .venv/bin/activate + uv pip install ".[dev]" + npm i shell: bash - - name: Run all tests + - name: Run tests + # Run all tests before generating the distribution run: | source .venv/bin/activate - uv pip install ".[dev]" - pytest --headless + npm run build + npm run test + shell: bash - name: Generate distribution + # Run setup.py to generate the distribution run: | source .venv/bin/activate - uv pip install -r requires-dev.txt -r requires-install.txt - npm i npm run dist npm pack && mv *.tgz dist/ + - name: Validate distribution + # Run tests again using the generated wheel file + run: | + uv venv test-dist + source dist/bin/activate + WHL_FILE=$(ls dist/*.whl) + uv pip install "${WHL_FILE}[dev]" + npm run test shell: bash - uses: ncipollo/release-action@v1 with: diff --git a/package-lock.json b/package-lock.json index 00725817..9f04f4c5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dash-ag-grid", - "version": "31.2.0", + "version": "31.3.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "dash-ag-grid", - "version": "31.2.0", + "version": "31.3.0", "license": "MIT", "dependencies": { "@emotion/react": "^11.11.3", diff --git a/package.json b/package.json index 65f4283c..63141aac 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "private::lint.eslint": "eslint src", "private::lint.prettier": "prettier src --list-different --ignore-path=.prettierignore", "lint": "run-s private::lint.*", + "test": "pytest --headless", "dist": "npm run build && run-s pre-flight-dag-version && rimraf build dist && python setup.py sdist bdist_wheel" }, "author": "Plotly ",