Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
SERVER_HOST_PORT=8880
CLIENT_HOST_PORT=5180

# Use the same exact server/client version. Alpha deployments must pin an
# immutable version such as 2.0.0-alpha.1 rather than using latest.
COPICK_WEB_VERSION=latest

# Path to your copick config JSON on the host machine.
# This gets mounted read-only into the container at /data/copick_config.json.
COPICK_CONFIG_PATH=./copick_config.json
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: conventional-commits
on:
pull_request:
branches: [main]
branches: [main, v2.0]
types:
- edited
- opened
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ name: Docker Build Check

on:
pull_request:
paths:
- 'client/**'
- 'server/**'
- '.github/workflows/docker-build.yml'
branches: [main, v2.0]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -121,3 +118,14 @@ jobs:
- name: Cleanup
if: always()
run: docker rm -f copick-client 2>/dev/null || true

container-behavior-gate:
name: Container behavior gate
if: always()
needs: [build-server, build-client]
runs-on: ubuntu-latest
steps:
- name: Require both production container smoke tests
run: |
test '${{ needs.build-server.result }}' = success
test '${{ needs.build-client.result }}' = success
54 changes: 48 additions & 6 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,35 @@
name: Build and Publish Docker Images

on:
push:
branches: [main]
workflow_call:
inputs:
ref:
description: Immutable commit to build
required: true
type: string
version:
description: Exact application version
required: true
type: string
prerelease:
description: Publish the moving alpha tag instead of latest
required: true
type: boolean
workflow_dispatch:
inputs:
ref:
description: Commit or tag to build
required: true
type: string
version:
description: Exact application version
required: true
type: string
prerelease:
description: Publish as an alpha without moving latest
required: true
default: true
type: boolean

env:
REGISTRY: ghcr.io
Expand All @@ -17,6 +43,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}

- name: Resolve immutable commit
id: commit
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"

- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
Expand All @@ -32,8 +64,10 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}-server
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=sha
type=raw,value=${{ inputs.version }}
type=raw,value=sha-${{ steps.commit.outputs.sha }}
type=raw,value=alpha,enable=${{ inputs.prerelease }}
type=raw,value=latest,enable=${{ !inputs.prerelease }}

- uses: docker/build-push-action@v6
with:
Expand All @@ -47,6 +81,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}

- name: Resolve immutable commit
id: commit
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"

- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
Expand All @@ -62,8 +102,10 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}-client
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=sha
type=raw,value=${{ inputs.version }}
type=raw,value=sha-${{ steps.commit.outputs.sha }}
type=raw,value=alpha,enable=${{ inputs.prerelease }}
type=raw,value=latest,enable=${{ !inputs.prerelease }}

- uses: docker/build-push-action@v6
with:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/js-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ name: JavaScript/TypeScript Linting

on:
pull_request:
branches: [main, v2.0]
paths:
- 'client/**'
push:
branches: [main]
branches: [main, v2.0]
paths:
- 'client/**'

Expand Down
93 changes: 93 additions & 0 deletions .github/workflows/migration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Migration Behavior

on:
pull_request:
branches: [main, v2.0]
push:
branches: [main, v2.0]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
server-behavior:
name: Server behavior (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: pip

- name: Install server and test dependencies
run: python -m pip install -e './server[dev]'

- name: Run server behavior tests
run: pytest -q server/tests

client-behavior:
name: Client behavior (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ["20.19", "22"]
defaults:
run:
working-directory: client
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
cache-dependency-path: client/package-lock.json

- name: Install locked client dependencies
run: npm ci

- name: Run OME-Zarr behavior tests
run: npm test

- name: Build client
run: npm run build

server-behavior-gate:
name: Server behavior gate
if: always()
needs: server-behavior
runs-on: ubuntu-latest
steps:
- name: Require every supported Python version
run: test '${{ needs.server-behavior.result }}' = success

client-behavior-gate:
name: Client behavior gate
if: always()
needs: client-behavior
runs-on: ubuntu-latest
steps:
- name: Require every supported Node version
run: test '${{ needs.client-behavior.result }}' = success

migration-behavior-gate:
name: Migration behavior gate
if: always()
needs: [server-behavior-gate, client-behavior-gate]
runs-on: ubuntu-latest
steps:
- name: Require server and client behavior
run: |
test '${{ needs.server-behavior-gate.result }}' = success
test '${{ needs.client-behavior-gate.result }}' = success
3 changes: 2 additions & 1 deletion .github/workflows/py-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ name: Python Linting

on:
pull_request:
branches: [main, v2.0]
paths:
- 'server/**'
- '.pre-commit-config.yaml'
push:
branches: [main]
branches: [main, v2.0]
paths:
- 'server/**'
- '.pre-commit-config.yaml'
Expand Down
Loading
Loading