Fix dashboard pruned/full label: accept MONERO_PRUNE=1 (#32) #186
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| dashboard: | |
| name: Dashboard tests (pytest + coverage) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dashboard with test extras | |
| run: pip install -e "build/dashboard[test]" | |
| - name: Run pytest with coverage gate | |
| working-directory: build/dashboard | |
| run: python -m pytest --cov=mining_dashboard --cov-report=term-missing --cov-fail-under=80 | |
| frontend: | |
| name: Frontend logic tests (node --test) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| # Pure client logic (worker sort, tooltip formatting) lives in static/logic.mjs and is | |
| # tested with Node's built-in runner — no package.json/node_modules/build step. Component | |
| # rendering is covered by a manual browser smoke test, not here. | |
| - name: Run frontend logic tests | |
| run: node --test build/dashboard/tests/frontend/*.test.mjs | |
| dashboard-image: | |
| name: Dashboard image (Docker test stage) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build the dashboard test stage (installs package + runs the suite in-container) | |
| run: docker build --target test ./build/dashboard | |
| shell: | |
| name: Shell tests (shellcheck + pithead suite) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # shellcheck is preinstalled on ubuntu-* runners, so we invoke it directly. | |
| # Avoid `apt-get update`, which refreshes every configured source (incl. | |
| # unrelated third-party mirrors like dl.google.com) and intermittently fails | |
| # the job when one is briefly out of sync — see issue #64. | |
| - name: Lint pithead and test scripts | |
| # Gate on warnings+errors (real issues); info-level style nits vary by shellcheck version. | |
| run: shellcheck --severity=warning pithead tests/stack/run.sh tests/stack/test_compose.sh | |
| - name: Run pithead test suite | |
| run: bash tests/stack/run.sh | |
| compose: | |
| name: Compose config validation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Validate docker-compose.yml interpolation | |
| run: bash tests/stack/test_compose.sh |