fix(scoring): a failed proof of work no longer floors the score #27
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: Unit tests | |
| # Go and Python unit tests, which nothing ran until now. | |
| # | |
| # Node's have been covered by the benchmark workflow since it existed, so the | |
| # gap was invisible from the outside: every check on a pull request was green | |
| # while two of the three implementations were unverified. Among the tests that | |
| # had never run in CI: | |
| # | |
| # - TestOnlyJA4TLSIsImplemented, which is the only thing standing between this | |
| # MIT project and a FoxIO License 1.1 module that cannot legally ship in it | |
| # - TestWeightsSumToOne, which guards the scoring weights invariant | |
| # - every Python test, on an implementation with no coverage but a container | |
| # smoke test | |
| # | |
| # The sync rule says a change lands in all three servers. That is worth very | |
| # little if only one of them is checked. | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| go: | |
| name: Go | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| # crypto/tls only exposes ClientHelloInfo.Extensions from 1.24, which | |
| # native JA4 needs. go.mod says so; keep this in step with it. | |
| go-version: '1.24' | |
| cache-dependency-path: server-go/go.sum | |
| - name: Vet | |
| working-directory: server-go | |
| run: go vet ./... | |
| - name: Test | |
| working-directory: server-go | |
| run: go test -race ./... | |
| python: | |
| name: Python | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| cache: pip | |
| cache-dependency-path: server-python/requirements.txt | |
| - name: Install dependencies | |
| working-directory: server-python | |
| run: pip install -r requirements.txt | |
| # Discovery, not a loop over files: a file that stops being discoverable | |
| # should show up as a drop in the count rather than as silence. It used to | |
| # report 12 tests and two import errors where there are in fact 43. | |
| - name: Test | |
| working-directory: server-python | |
| run: python -m unittest discover -p "test_*.py" -v |