console: no-cache the SPA entry, cache hashed assets hard #96
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: | |
| branches: [ master, main ] | |
| pull_request: | |
| branches: [ master, main ] | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # Change streams (the ingest path) require a replica set, which service | |
| # containers can't be configured as — hence docker run. | |
| - name: Start MongoDB (single-node replica set) | |
| run: | | |
| docker run -d --name ci-mongo -p 27017:27017 mongo:7 --replSet rs0 --bind_ip_all | |
| for i in $(seq 1 30); do | |
| docker exec ci-mongo mongosh --quiet --eval 'db.runCommand({ping: 1})' && break | |
| sleep 1 | |
| done | |
| docker exec ci-mongo mongosh --quiet --eval 'rs.initiate({_id: "rs0", members: [{_id: 0, host: "localhost:27017"}]})' | |
| for i in $(seq 1 30); do | |
| [ "$(docker exec ci-mongo mongosh --quiet --eval 'db.hello().isWritablePrimary')" = "true" ] && break | |
| sleep 1 | |
| done | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.21' | |
| - name: Cache Go modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Start MinIO (S3 chunk store backend) | |
| run: | | |
| docker run -d --name ci-minio -p 9010:9000 \ | |
| -e MINIO_ROOT_USER=argon -e MINIO_ROOT_PASSWORD=argon12345 \ | |
| minio/minio server /data | |
| for i in $(seq 1 30); do | |
| curl -sf http://localhost:9010/minio/health/live && break | |
| sleep 1 | |
| done | |
| - name: Run tests | |
| env: | |
| ARGON_TEST_S3_ENDPOINT: http://localhost:9010 | |
| ARGON_TEST_S3_BUCKET: argon-test | |
| AWS_ACCESS_KEY_ID: argon | |
| AWS_SECRET_ACCESS_KEY: argon12345 | |
| AWS_REGION: us-east-1 | |
| run: go test -v ./... | |
| - name: Build CLI | |
| working-directory: ./cli | |
| run: go build -v . | |
| - name: Test API | |
| working-directory: ./api | |
| run: go test -v ./... | |
| driver-compat: | |
| name: Driver Compatibility | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.24' | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Start MongoDB (single-node replica set) | |
| run: | | |
| docker run -d --name compat-mongo -p 27017:27017 mongo:7 --replSet rs0 --bind_ip_all | |
| for i in $(seq 1 30); do | |
| docker exec compat-mongo mongosh --quiet --eval 'db.runCommand({ping: 1})' && break | |
| sleep 1 | |
| done | |
| docker exec compat-mongo mongosh --quiet --eval 'rs.initiate({_id: "rs0", members: [{_id: 0, host: "localhost:27017"}]})' | |
| for i in $(seq 1 30); do | |
| [ "$(docker exec compat-mongo mongosh --quiet --eval 'db.hello().isWritablePrimary')" = "true" ] && break | |
| sleep 1 | |
| done | |
| - name: Install Python driver | |
| run: pip install pymongo pytest | |
| - name: Run the driver-compat harness | |
| run: bash compat/run.sh | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.21' | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v6 | |
| with: | |
| version: latest | |
| args: --timeout=5m |