chore(dx/ci): remove most references to NX, apart from unit test

This commit is contained in:
Elian Doran 2025-09-02 16:40:52 +03:00
parent ce0fd3cec2
commit e18a8556c1
No known key found for this signature in database
7 changed files with 8 additions and 41 deletions

View file

@ -86,7 +86,7 @@ runs:
APPLE_ID_PASSWORD: ${{ env.APPLE_ID_PASSWORD }} APPLE_ID_PASSWORD: ${{ env.APPLE_ID_PASSWORD }}
WINDOWS_SIGN_EXECUTABLE: ${{ env.WINDOWS_SIGN_EXECUTABLE }} WINDOWS_SIGN_EXECUTABLE: ${{ env.WINDOWS_SIGN_EXECUTABLE }}
TRILIUM_ARTIFACT_NAME_HINT: TriliumNotes-${{ github.ref_name }}-${{ inputs.os }}-${{ inputs.arch }} TRILIUM_ARTIFACT_NAME_HINT: TriliumNotes-${{ github.ref_name }}-${{ inputs.os }}-${{ inputs.arch }}
run: pnpm nx --project=desktop electron-forge:make -- --arch=${{ inputs.arch }} --platform=${{ inputs.forge_platform }} run: pnpm run --filter desktop electron-forge:make -- --arch=${{ inputs.arch }} --platform=${{ inputs.forge_platform }}
# Add DMG signing step # Add DMG signing step
- name: Sign DMG - name: Sign DMG

View file

@ -23,7 +23,7 @@ runs:
shell: bash shell: bash
run: | run: |
pnpm run chore:update-build-info pnpm run chore:update-build-info
pnpm nx --project=server package pnpm server:package
- name: Prepare artifacts - name: Prepare artifacts
shell: bash shell: bash
run: | run: |

View file

@ -19,33 +19,9 @@ permissions:
pull-requests: write # for PR comments pull-requests: write # for PR comments
jobs: jobs:
check-affected:
name: Check affected jobs (NX)
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v5
with:
fetch-depth: 0 # needed for https://github.com/marketplace/actions/nx-set-shas
- uses: pnpm/action-setup@v4
- name: Set up node & dependencies
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- uses: nrwl/nx-set-shas@v4
- name: Check affected
run: pnpm nx affected --verbose -t typecheck build rebuild-deps test-build
test_dev: test_dev:
name: Test development name: Test development
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs:
- check-affected
steps: steps:
- name: Checkout the repository - name: Checkout the repository
uses: actions/checkout@v5 uses: actions/checkout@v5
@ -66,7 +42,6 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: needs:
- test_dev - test_dev
- check-affected
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v5
- uses: pnpm/action-setup@v4 - uses: pnpm/action-setup@v4
@ -75,7 +50,7 @@ jobs:
- name: Update build info - name: Update build info
run: pnpm run chore:update-build-info run: pnpm run chore:update-build-info
- name: Trigger client build - name: Trigger client build
run: pnpm nx run client:build run: pnpm client:build
- name: Send client bundle stats to RelativeCI - name: Send client bundle stats to RelativeCI
if: false if: false
uses: relative-ci/agent-action@v3 uses: relative-ci/agent-action@v3
@ -83,7 +58,7 @@ jobs:
webpackStatsFile: ./apps/client/dist/webpack-stats.json webpackStatsFile: ./apps/client/dist/webpack-stats.json
key: ${{ secrets.RELATIVE_CI_CLIENT_KEY }} key: ${{ secrets.RELATIVE_CI_CLIENT_KEY }}
- name: Trigger server build - name: Trigger server build
run: pnpm nx run server:build run: pnpm run server:build
- uses: docker/setup-buildx-action@v3 - uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v6 - uses: docker/build-push-action@v6
with: with:
@ -95,7 +70,6 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: needs:
- build_docker - build_docker
- check-affected
strategy: strategy:
matrix: matrix:
include: include:
@ -112,7 +86,7 @@ jobs:
- name: Update build info - name: Update build info
run: pnpm run chore:update-build-info run: pnpm run chore:update-build-info
- name: Trigger build - name: Trigger build
run: pnpm nx run server:build run: pnpm server:build
- name: Set IMAGE_NAME to lowercase - name: Set IMAGE_NAME to lowercase
run: echo "IMAGE_NAME=${IMAGE_NAME,,}" >> $GITHUB_ENV run: echo "IMAGE_NAME=${IMAGE_NAME,,}" >> $GITHUB_ENV

View file

@ -57,7 +57,6 @@ jobs:
cache: 'pnpm' cache: 'pnpm'
- name: Install dependencies - name: Install dependencies
run: pnpm install --frozen-lockfile run: pnpm install --frozen-lockfile
- uses: nrwl/nx-set-shas@v4
- name: Update nightly version - name: Update nightly version
run: npm run chore:ci-update-nightly-version run: npm run chore:ci-update-nightly-version
- name: Run the build - name: Run the build

View file

@ -41,7 +41,6 @@ jobs:
cache: 'pnpm' cache: 'pnpm'
- name: Install dependencies - name: Install dependencies
run: pnpm install --frozen-lockfile run: pnpm install --frozen-lockfile
- uses: nrwl/nx-set-shas@v4
- name: Run the build - name: Run the build
uses: ./.github/actions/build-electron uses: ./.github/actions/build-electron
with: with:

View file

@ -169,12 +169,6 @@
"runBuildTargetDependencies": false "runBuildTargetDependencies": false
} }
}, },
"package": {
"dependsOn": [
"build"
],
"command": "bash apps/server/scripts/build-server.sh"
},
"start-prod": { "start-prod": {
"dependsOn": [ "dependsOn": [
"build" "build"
@ -320,7 +314,8 @@
}, },
"scripts": { "scripts": {
"dev": "cross-env NODE_ENV=development TRILIUM_ENV=dev TRILIUM_DATA_DIR=data TRILIUM_RESOURCE_DIR=src tsx watch --ignore '../client/node_modules/.vite-temp' ./src/main.ts", "dev": "cross-env NODE_ENV=development TRILIUM_ENV=dev TRILIUM_DATA_DIR=data TRILIUM_RESOURCE_DIR=src tsx watch --ignore '../client/node_modules/.vite-temp' ./src/main.ts",
"build": "tsx scripts/build.ts" "build": "tsx scripts/build.ts",
"package": "pnpm build && bash scripts/build-server.sh"
}, },
"main": "./src/main.ts" "main": "./src/main.ts"
} }

View file

@ -11,7 +11,7 @@ async function main() {
// Copy node modules dependencies // Copy node modules dependencies
build.copyNodeModules([ "better-sqlite3", "bindings", "file-uri-to-path" ]); build.copyNodeModules([ "better-sqlite3", "bindings", "file-uri-to-path" ]);
build.copy("node_modules/jsdom/lib/jsdom/living/xhr/xhr-sync-worker.js", "xhr-sync-worker.js"); build.copy("/node_modules/jsdom/lib/jsdom/living/xhr/xhr-sync-worker.js", "xhr-sync-worker.js");
// Integrate the client. // Integrate the client.
build.triggerBuildAndCopyTo("apps/client", "public/"); build.triggerBuildAndCopyTo("apps/client", "public/");