Tests: use AWS's documented example key (AKIAIOSFODNN7EXAMPLE) for re… #50
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: | |
| pull_request: | |
| jobs: | |
| python: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| # Project is stdlib-only; no pip install needed. Node is present so | |
| # tests/test_jail.py (the path-jail security boundary) actually runs | |
| # instead of self-skipping -- jail.mjs has zero npm dependencies, so | |
| # a bare `node` on PATH is all it needs. | |
| - run: python3 -m unittest discover -s tests | |
| ui: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: ui/package-lock.json | |
| - working-directory: ui | |
| run: npm ci | |
| - working-directory: ui | |
| run: npx tsc --noEmit | |
| - working-directory: ui | |
| run: npm run build | |
| bench-selftest: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| # Zero API spend, no secrets: proves every A/B safety scorer still | |
| # discriminates its good ref from its bad ref before anyone trusts a | |
| # live benchmark run against it. | |
| - run: python3 -m evals.ab.run --selftest | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pipx run --spec 'ruff==0.15.22' ruff check . | |
| installer: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run install.sh against this checkout | |
| run: | | |
| export CODECOUNCIL_HOME="$RUNNER_TEMP/cc-home" | |
| export CODECOUNCIL_REPO_URL="file://$GITHUB_WORKSPACE" | |
| sh install.sh | |
| test -x "$HOME/.local/bin/codecouncil" | |
| test -f "$HOME/.codecouncil/env" | |
| - name: Launcher runs and prints usage | |
| run: | | |
| export CODECOUNCIL_HOME="$RUNNER_TEMP/cc-home" | |
| "$HOME/.local/bin/codecouncil" --help | |
| - name: Re-run is idempotent (update path) | |
| run: | | |
| export CODECOUNCIL_HOME="$RUNNER_TEMP/cc-home" | |
| export CODECOUNCIL_REPO_URL="file://$GITHUB_WORKSPACE" | |
| sh install.sh |