mirror of
https://github.com/logseq/logseq.git
synced 2026-05-13 23:42:19 +00:00
* migrate yarn to pnpm
* chore: update pnpm version to 10.33.0 across all package.json files
* chore: update .npmrc and package.json for improved dependency management
* chore: unify Clojure, Node, and Java version in workflow files
* fix: enable shamefully-hoist for now and add electron, keytar to onlyBuiltDependencies
* feat: add cider/piggieback dependency and update nREPL middleware configuration to silence warnings
* ensure pnpm setup prior to node setup
* fix: update logseq/bb-tasks git SHA
* feat: add pnpm configuration for onlyBuiltDependencies in package.json
* feat: add onlyBuiltDependencies configuration for better-sqlite3 in pnpm settings
* chore: update pnpm lockfile
* fix: resolve merge conflicts
* fix: remove invisible characters from markdown headers
* fix: update .npmrc comments for clarity on lockfile usage
* Revert "feat: add cider/piggieback dependency and update nREPL middleware configuration to silence warnings"
This reverts commit 70a111936f.
* fix: remove invisible characters from various README files and add .editorconfig
* fix: clarify lockfile resolution process in SKILL.md
---------
Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
168 lines
4.4 KiB
YAML
168 lines
4.4 KiB
YAML
name: Clojure RTC E2E
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
paths:
|
|
- 'clj-e2e/**'
|
|
- '.github/workflows/clj-rtc-e2e.yml'
|
|
- src/**
|
|
- deps/**
|
|
- packages/**
|
|
pull_request:
|
|
branches: [master]
|
|
paths:
|
|
- 'clj-e2e/**'
|
|
- '.github/workflows/clj-rtc-e2e.yml'
|
|
- src/**
|
|
- deps/**
|
|
- packages/**
|
|
|
|
env:
|
|
CLOJURE_VERSION: '1.12.4.1618'
|
|
JAVA_VERSION: '21'
|
|
# This is the latest node version we can run.
|
|
NODE_VERSION: '24'
|
|
BABASHKA_VERSION: '1.12.215'
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-22.04
|
|
if: "contains(github.event.head_commit.message, 'rtc')"
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10.33.0
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
cache: 'pnpm'
|
|
cache-dependency-path: |
|
|
pnpm-lock.yaml
|
|
|
|
- name: Set up Java
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: ${{ env.JAVA_VERSION }}
|
|
|
|
- name: Set up Clojure
|
|
uses: DeLaGuardo/setup-clojure@13.5
|
|
with:
|
|
cli: ${{ env.CLOJURE_VERSION }}
|
|
bb: ${{ env.BABASHKA_VERSION }}
|
|
|
|
- name: Clojure cache
|
|
uses: actions/cache@v4
|
|
id: clojure-deps
|
|
with:
|
|
path: |
|
|
~/.m2/repository
|
|
~/.gitlibs
|
|
key: ${{ runner.os }}-clojure-deps-${{ hashFiles('deps.edn') }}
|
|
restore-keys: ${{ runner.os }}-clojure-deps-
|
|
|
|
- name: Fetch Clojure deps
|
|
if: steps.clojure-deps.outputs.cache-hit != 'true'
|
|
run: clojure -A:cljs -P
|
|
|
|
- name: Shadow-cljs cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: .shadow-cljs
|
|
# ensure update cache every time
|
|
key: ${{ runner.os }}-shadow-cljs-${{ github.sha }}
|
|
# will match most recent upload
|
|
restore-keys: |
|
|
${{ runner.os }}-shadow-cljs-
|
|
|
|
- name: Fetch pnpm deps
|
|
run: pnpm install --frozen-lockfile
|
|
env:
|
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
|
|
|
|
# NOTE: require the app to be build with DEV-RELEASE flag
|
|
- name: Prepare E2E test build
|
|
run: |
|
|
pnpm gulp:build && clojure -M:cljs release app db-worker --config-merge "{:closure-defines {frontend.config/DEV-RELEASE true}}" --debug && pnpm webpack-app-build
|
|
|
|
- name: Upload build artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: static-build
|
|
path: static/
|
|
retention-days: 1
|
|
|
|
test:
|
|
name: Test ${{ matrix.test-task }}
|
|
needs: build
|
|
runs-on: ubuntu-22.04
|
|
if: "contains(github.event.head_commit.message, 'rtc')"
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
test-task: [run-rtc-extra-test, run-rtc-extra-part2-test]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
|
|
- name: Set up pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10.33.0
|
|
|
|
- name: Set up Java
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: ${{ env.JAVA_VERSION }}
|
|
|
|
- name: Set up Clojure
|
|
uses: DeLaGuardo/setup-clojure@13.5
|
|
with:
|
|
cli: ${{ env.CLOJURE_VERSION }}
|
|
bb: ${{ env.BABASHKA_VERSION }}
|
|
|
|
- name: Clojure cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.m2/repository
|
|
~/.gitlibs
|
|
key: ${{ runner.os }}-clojure-deps-${{ hashFiles('deps.edn') }}
|
|
restore-keys: ${{ runner.os }}-clojure-deps-
|
|
|
|
- name: Download build artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: static-build
|
|
path: static
|
|
|
|
- name: Prepare public dir
|
|
run: |
|
|
rsync -avz --exclude node_modules --exclude android --exclude ios ./static/ ./public/
|
|
ls -lR ./public
|
|
|
|
- name: Run e2e tests
|
|
run: cd clj-e2e && timeout 30m bb ${{ matrix.test-task }}
|
|
|
|
- name: Collect screenshots
|
|
if: ${{ failure() }}
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: e2e-screenshots-${{ matrix.test-task }}
|
|
path: clj-e2e/e2e-dump/*
|
|
retention-days: 1
|