Skip to content
Merged

CI Fix #1294

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: 2 additions & 2 deletions .github/workflows/FissionUnitTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
run: npm install

- name: Run Tests
run: HOME=/root npm run test
run: HOME=/root npm run test --bail=1

runAssetpackTests:
name: Assetpack Tests
Expand Down Expand Up @@ -92,6 +92,6 @@ jobs:
${{runner.os}}-npm

- name: Run Assetpack Tests
run: HOME=/root npm run test src/test/mirabuf/DefaultAssets.test.ts
run: HOME=/root npm run test src/test/mirabuf/DefaultAssets.test.ts --bail=1
env:
VITE_RUN_ASSETPACK_TEST: true
69 changes: 41 additions & 28 deletions fission/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@
import {loadEnv, type ProxyOptions} from "vite"
import glsl from "vite-plugin-glsl"
import {defineConfig} from "vitest/config"
import type {TestCase, TestSuite} from "vitest/node";

const basePath = "/fission/"
const serverPort = 3000
const dockerServerPort = 80




const useLocalAPS = false
const useSsl = false

Expand Down Expand Up @@ -47,8 +46,8 @@
.catch(() => false)

// https://vitejs.dev/config/
export default defineConfig(async ({ mode }) => {
process.env = { ...process.env, ...loadEnv(mode, process.cwd()) }
export default defineConfig(async ({mode}) => {
process.env = {...process.env, ...loadEnv(mode, process.cwd())}
process.env.VITE_MULTIPLAYER_PORT = mode === "test" ? "3001" : "9002"
const useLocalAssets = localAssetsExist && (mode === "test" || process.env.NODE_ENV == "development")

Expand All @@ -58,42 +57,42 @@
console.log(`Using ${useLocalAssets ? "local" : "remote"} mirabuf assets`)

const proxies: Record<string, ProxyOptions> = {}
const assetProxy:ProxyOptions = useLocalAssets
const assetProxy: ProxyOptions = useLocalAssets
? {
target: `http://localhost:${mode === "test" ? 3001 : serverPort}`,
changeOrigin: true,
secure: false,
rewrite: path =>
path
.replace(/^\/api/, "/Downloadables")
}
target: `http://localhost:${mode === "test" ? 3001 : serverPort}`,
changeOrigin: true,
secure: false,
rewrite: path =>
path
.replace(/^\/api/, "/Downloadables")
}
: {
target: `https://synthesis.autodesk.com/`,
changeOrigin: true,
secure: true,
}
target: `https://synthesis.autodesk.com/`,

Check notice on line 70 in fission/vite.config.ts

View check run for this annotation

Autodesk Chorus / privacy/bearer

internal_service.: https://synthesis.autodesk.com/

This check is currently in beta. - Personal Data at Autodesk: https://share.autodesk.com/:b:/r/sites/LegalTopicsToolkits/Shared%20Documents/Personal%20Data%20at%20Autodesk.pdf - Data Privacy & Governance Policies at Autodesk: https://share.autodesk.com/sites/DPG/SitePages/Policies-%26-Guidelines.aspx
changeOrigin: true,
secure: true,
}
proxies["/api/mira"] = assetProxy
proxies["/api/match_configs"] = assetProxy
proxies["/api/aps"] = useLocalAPS
? {
target: `http://localhost:${dockerServerPort}/`,
changeOrigin: true,
secure: false,
}
target: `http://localhost:${dockerServerPort}/`,
changeOrigin: true,
secure: false,
}
: {
target: `https://synthesis.autodesk.com/`,
changeOrigin: true,
secure: true,
}
target: `https://synthesis.autodesk.com/`,

Check notice on line 83 in fission/vite.config.ts

View check run for this annotation

Autodesk Chorus / privacy/bearer

internal_service.: https://synthesis.autodesk.com/

This check is currently in beta. - Personal Data at Autodesk: https://share.autodesk.com/:b:/r/sites/LegalTopicsToolkits/Shared%20Documents/Personal%20Data%20at%20Autodesk.pdf - Data Privacy & Governance Policies at Autodesk: https://share.autodesk.com/sites/DPG/SitePages/Policies-%26-Guidelines.aspx
changeOrigin: true,
secure: true,
}
return {
plugins: plugins,
publicDir: "./public",
resolve: {
alias: [
{ find: "@/components", replacement: path.resolve(__dirname, "src", "ui", "components") },
{ find: "@/modals", replacement: path.resolve(__dirname, "src", "ui", "modals") },
{ find: "@/panels", replacement: path.resolve(__dirname, "src", "ui", "panels") },
{ find: "@", replacement: path.resolve(__dirname, "src") },
{find: "@/components", replacement: path.resolve(__dirname, "src", "ui", "components")},
{find: "@/modals", replacement: path.resolve(__dirname, "src", "ui", "modals")},
{find: "@/panels", replacement: path.resolve(__dirname, "src", "ui", "panels")},
{find: "@", replacement: path.resolve(__dirname, "src")},
],
},
define: {
Expand All @@ -105,6 +104,20 @@
testTimeout: 10000,
globals: true,
environment: "jsdom",
reporters: (process.env.GITHUB_ACTIONS
? ["github-actions", "default", {
onTestCaseResult(test:TestCase) {
if (!test.ok()) {
console.warn(test.fullName, "failed")
}
},
onTestSuiteResult(testSuite: TestSuite) {
const ok = testSuite.ok()

if (!ok) setTimeout(() => process.exit(1), 1000)
}
}] : ["default"])
,
browser: {
enabled: true,
provider: "playwright",
Expand Down
Loading