Skip to content
Merged
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
21 changes: 14 additions & 7 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

env:
PYTHON_VERSION: '3.14'

jobs:
tests:
permissions:
Expand All @@ -23,29 +26,33 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Set up Python
id: setup-python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.14'
python-version: ${{ env.PYTHON_VERSION }}

- name: Set up uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true

- name: Set up Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: latest

- name: Install Python Dependencies
shell: bash
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e .[dev]
env:
UV_PYTHON: ${{ steps.setup-python.outputs.python-path }}
run: uv sync --locked

- name: Install Node Dependencies
shell: bash
run: npm ci --ignore-scripts

- name: Test with pytest
id: pytest
shell: bash
run: python -m pytest
run: uv run --locked pytest

- name: Test with Jest
id: jest
Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/update-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
PYTHON_VERSION: '3.14'

jobs:
update:
permissions:
Expand All @@ -26,14 +29,20 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Setup python
id: setup-python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.14'
python-version: ${{ env.PYTHON_VERSION }}

- name: Set up uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
enable-cache: true

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install .
env:
UV_PYTHON: ${{ steps.setup-python.outputs.python-path }}
run: uv sync --locked --no-dev

- name: Restore generated data cache
shell: bash
Expand All @@ -58,14 +67,14 @@ jobs:
PATREON_CAMPAIGN_ID: 6131567
READTHEDOCS_TOKEN: ${{ secrets.READTHEDOCS_TOKEN }}
THREADING_EXCEPTION_HANDLER: "true"
run: python -u -m src.updater
run: uv run --locked --no-dev python -u -m src.updater

- name: Cat log
if: always()
run: cat ./logs/updater.log

- name: Build dashboard data
run: python -u -m src.builder
run: uv run --locked --no-dev python -u -m src.builder

- name: Prepare Artifacts # uploading artifacts will fail if not zipped due to very large quantity of files
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ A dashboard for viewing LizardByte repository data inside a Jekyll static site.
### Python unit tests

```bash
python -m pip install -e ".[dev]"
python -m pytest
uv sync --locked
uv run --locked pytest
```

### JavaScript unit tests
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "dashboard"
dynamic = ["version"]
version = "0.0.0"
description = "Dashboard for LizardByte"
requires-python = ">=3.14"
license = {text = "MIT"}
Expand All @@ -22,7 +22,7 @@ dependencies = [
"unhandled_exit==1.0.0",
]

[project.optional-dependencies]
[dependency-groups]
dev = [
"flake8==7.3.0",
"pytest==9.0.3",
Expand Down Expand Up @@ -51,6 +51,7 @@ addopts = [
"--color=yes",
"--cov=src",
"--cov-report=term-missing",
"--cov-report=xml:coverage/python-coverage.xml",
"--cov-fail-under=100",
"--junitxml=junit-python.xml",
"-o", "junit_family=legacy",
Expand Down
Loading