Repository navigation
docs(self-hosting): warn about What's Up Docker before 9.1.0 #658
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: [main] | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:18 | |
| env: | |
| POSTGRES_PASSWORD: alphone | |
| ports: | |
| - 5433:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 2s | |
| --health-timeout 3s | |
| --health-retries 15 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| - run: make cover GOTESTFLAGS=-race | |
| - run: make test-uncovered GOTESTFLAGS=-race | |
| - run: go vet ./... | |
| - uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| with: | |
| files: .covdata/cover.out | |
| flags: backend | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| version: v11.3.0 # pin CLI, 'latest' can transiently fail GPG SHASUM verify | |
| frontend: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10 | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version-file: .node-version | |
| cache: pnpm | |
| cache-dependency-path: pnpm-lock.yaml | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm peers check | |
| working-directory: ${{ github.workspace }} | |
| - run: pnpm typecheck | |
| - run: pnpm lint | |
| - run: pnpm lint:css | |
| - run: pnpm cover | |
| - uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| with: | |
| files: frontend/coverage/lcov.info | |
| flags: frontend | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| version: v11.3.0 # pin CLI, 'latest' can transiently fail GPG SHASUM verify | |
| docs: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: docs | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10 | |
| with: | |
| package_json_file: docs/package.json | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version-file: .node-version | |
| cache: pnpm | |
| cache-dependency-path: docs/pnpm-lock.yaml | |
| - run: pnpm install --frozen-lockfile | |
| - run: pnpm run build | |
| e2e: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| - uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10 | |
| - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version-file: .node-version | |
| cache: pnpm | |
| cache-dependency-path: pnpm-lock.yaml | |
| - run: pnpm install --frozen-lockfile | |
| - run: make generate | |
| - run: git diff --exit-code | |
| - name: schema diff against the base branch | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| git fetch origin ${{ github.base_ref }} --depth 1 | |
| if git cat-file -e "origin/${{ github.base_ref }}:graph/schema.graphql" 2>/dev/null; then | |
| pnpm --filter @alphone/e2e run schema:diff \ | |
| "git:origin/${{ github.base_ref }}:graph/schema.graphql" ../../graph/schema.graphql \ | |
| --rule ./approved-removals.ts | |
| else | |
| echo "no schema snapshot on the base branch, skipping" | |
| fi | |
| - run: pnpm --filter @alphone/e2e exec playwright install --with-deps chromium | |
| - run: make e2e | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| if: failure() | |
| with: | |
| name: playwright-report | |
| path: test/e2e/playwright-report/ | |
| retention-days: 7 | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| - uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0 | |
| with: | |
| version: v2.13.2 | |
| install-mode: goinstall | |
| - run: go run ./cmd/doclint | |
| vuln: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| - run: go tool govulncheck ./... | |
| sdk-compat: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| ref: ${{ github.base_ref }} | |
| path: base | |
| - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version-file: go.mod | |
| - run: go install golang.org/x/exp/cmd/apidiff@v0.0.0-20260611194520-c48552f49976 | |
| - run: | | |
| if [ ! -d base/sdk ]; then | |
| echo "no sdk package on base branch; skipping" | |
| exit 0 | |
| fi | |
| (cd base && apidiff -w /tmp/sdk-base.export ./sdk) | |
| apidiff -incompatible /tmp/sdk-base.export ./sdk | tee /tmp/incompatible.txt | |
| if [ -s /tmp/incompatible.txt ] && grep -q '^0\.' internal/version/VERSION; then | |
| echo "::warning title=sdk contract::the sdk changed incompatibly, allowed while AlphOne is below 1.0" | |
| exit 0 | |
| fi | |
| test ! -s /tmp/incompatible.txt |