Add the TestProtonDriveFake init.d script, which builds and starts protonfake on port 28642 and passes on the session it prints, and a test_all entry for it, so fs/operations, fs/sync, vfs and cmd/bisync run against the fake server. Five tests that need a second Fs of the same account to see what the first wrote are ignored, as each Fs caches separately, and cmd/gitannex is skipped as for every init.d remote; both are in docs/TODO.md. Add a Gitea Actions workflow that builds, vets, lints, race-tests, fuzzes and vulnerability-checks the backend, and re-verify the agent permission table on the host toolchain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
52 lines
1.3 KiB
YAML
52 lines
1.3 KiB
YAML
# Fork CI for the Proton Drive backend. Every step is hermetic: the
|
|
# tests run against the fake server in backend/protondrive/protontest.
|
|
name: ci
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
env:
|
|
# Never pick up a config holding a real Proton remote.
|
|
RCLONE_CONFIG: /notfound
|
|
|
|
jobs:
|
|
protondrive:
|
|
runs-on: ubuntu-latest
|
|
# The race suite takes about 6 minutes on a fast machine.
|
|
timeout-minutes: 45
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
# Caches the module and build caches, keyed on go.sum.
|
|
cache: true
|
|
|
|
- name: Build
|
|
run: go build ./...
|
|
|
|
- name: Vet
|
|
run: go vet ./backend/protondrive/...
|
|
|
|
- name: Lint
|
|
uses: golangci/golangci-lint-action@v8
|
|
with:
|
|
version: v2.15.0
|
|
args: ./backend/protondrive/...
|
|
|
|
- name: Test
|
|
run: go test -race ./backend/protondrive/...
|
|
|
|
- name: Fuzz
|
|
run: |
|
|
for target in $(go test -list '^Fuzz' ./backend/protondrive/ | grep '^Fuzz'); do
|
|
go test -run '^$' -fuzz "^${target}\$" -fuzztime 20s ./backend/protondrive/
|
|
done
|
|
|
|
- name: Vulnerability check
|
|
run: go run golang.org/x/vuln/cmd/govulncheck@latest ./backend/protondrive/...
|