docs: keep original README heading #7
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: Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| smoke: | |
| name: Python ${{ matrix.python-version }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.10', '3.12'] | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Validate tracked assets | |
| run: | | |
| python -m json.tool hot100.json >/dev/null | |
| python -m py_compile hot100.py | |
| node --check web/app.js | |
| - name: Run CLI smoke test | |
| shell: bash | |
| run: | | |
| state_dir="$(mktemp -d)" | |
| state_file="$state_dir/progress.json" | |
| trap 'rm -rf "$state_dir"' EXIT | |
| python hot100.py --state "$state_file" next >/dev/null | |
| python hot100.py --state "$state_file" stats | grep -q "picked 1" | |
| test "$(python hot100.py --state "$state_file" export | wc -l | tr -d ' ')" -eq 101 |