mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
77 lines
2.0 KiB
YAML
77 lines
2.0 KiB
YAML
name: Copilot Cron Test
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
|
|
|
|
jobs:
|
|
build-server-native:
|
|
name: Build Server native
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
CARGO_PROFILE_RELEASE_DEBUG: '1'
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Setup Node.js
|
|
uses: ./.github/actions/setup-node
|
|
with:
|
|
extra-flags: workspaces focus @affine/server-native
|
|
electron-install: false
|
|
- name: Build Rust
|
|
uses: ./.github/actions/build-rust
|
|
with:
|
|
target: 'x86_64-unknown-linux-gnu'
|
|
package: '@affine/server-native'
|
|
nx_token: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
|
|
- name: Upload server-native.node
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: server-native.node
|
|
path: ./packages/backend/native/server-native.node
|
|
if-no-files-found: error
|
|
|
|
copilot-e2e-test:
|
|
name: Server Copilot E2E Test
|
|
runs-on: [self-hosted, copilot-ci]
|
|
env:
|
|
DISTRIBUTION: web
|
|
DATABASE_URL: postgresql://affine:affine@localhost:5432/affine
|
|
IN_CI_TEST: true
|
|
needs:
|
|
- build-server-native
|
|
services:
|
|
postgres:
|
|
image: postgres
|
|
env:
|
|
POSTGRES_PASSWORD: affine
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
ports:
|
|
- 5432:5432
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: ./.github/actions/setup-node
|
|
with:
|
|
corepack-install: true
|
|
playwright-install: true
|
|
hard-link-nm: false
|
|
|
|
- name: Download server-native.node
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: server-native.node
|
|
path: ./packages/backend/server
|
|
|
|
- name: Run Copilot E2E Test
|
|
uses: ./.github/actions/copilot-test
|
|
with:
|
|
openai-key: ${{ secrets.COPILOT_OPENAI_API_KEY }}
|
|
fal-key: ${{ secrets.COPILOT_FAL_API_KEY }}
|