deps(actions): bump actions/cache from 5 to 6 #8
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: Test Telar Scripts | |
| # | |
| # This workflow runs Telar's unit test suites: | |
| # | |
| # 1. Python unit tests — CSV parsing, column normalisation, widget rendering, | |
| # IIIF metadata extraction, glossary linking, and image processing. | |
| # | |
| # 2. JavaScript unit tests — coordinate maths, manifest URL resolution, | |
| # content detection predicates, and state structure. | |
| # | |
| # On pull request to main, all test suites run automatically. When triggered | |
| # manually via workflow_dispatch, you can choose which suites to run. | |
| # | |
| # Version: v0.9.2-beta | |
| on: | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| inputs: | |
| run_python: | |
| description: 'Run Python unit tests' | |
| type: boolean | |
| default: true | |
| run_javascript: | |
| description: 'Run JavaScript unit tests' | |
| type: boolean | |
| default: true | |
| jobs: | |
| python: | |
| name: Python Unit Tests | |
| runs-on: ubuntu-latest | |
| if: ${{ (github.repository == 'UCSB-AMPLab/telar' || github.repository == 'juancobo/telar') && (github.event_name != 'workflow_dispatch' || inputs.run_python) }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Run Python unit tests | |
| run: | | |
| python -m pytest tests/unit/ -v --tb=short | |
| javascript: | |
| name: JavaScript Unit Tests | |
| runs-on: ubuntu-latest | |
| if: ${{ (github.repository == 'UCSB-AMPLab/telar' || github.repository == 'juancobo/telar') && (github.event_name != 'workflow_dispatch' || inputs.run_javascript) }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Run JavaScript unit tests | |
| run: npm run test:js |