Skip to content

Commit 34323e5

Browse files
authored
deploy test: more logs, no obfuscation (#2)
* deploy test: more logs, no obfuscation * Adjust base url for svelte when running from github pages. only run unit tests * let pr preview make comments on prs * temp remove obfuscation
1 parent 4185ee0 commit 34323e5

File tree

5 files changed

+17
-14
lines changed

5 files changed

+17
-14
lines changed

.github/workflows/deploy.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ jobs:
1818
- name: Checkout 🛎️
1919
uses: actions/checkout@v4
2020

21+
- name: Set BASE_PATH
22+
run: echo "BASE_PATH=/${{ github.event.repository.name }}" >> $GITHUB_ENV
23+
2124
- name: Install and Build 🔧
2225
run: |
2326
npm ci
2427
npm run build
25-
npm run obfuscate
2628
2729
- name: Deploy 🚀
2830
uses: JamesIves/github-pages-deploy-action@v4

.github/workflows/preview.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ on:
2121
- '.env.*'
2222
permissions:
2323
contents: write
24+
pull-requests: write
2425
concurrency: preview-${{ github.ref }}
2526

2627
jobs:
@@ -30,11 +31,13 @@ jobs:
3031
- name: Checkout
3132
uses: actions/checkout@v3
3233

34+
- name: Set BASE_PATH
35+
run: echo "BASE_PATH=/${{ github.event.repository.name }}/pr-preview/pr-${{ github.event.number }}" >> $GITHUB_ENV
36+
3337
- name: Install and Build
3438
run: |
3539
npm ci
3640
npm run build
37-
npm run obfuscate
3841
3942
- name: Deploy preview
4043
uses: rossjrw/pr-preview-action@v1

.github/workflows/test.yml

+5-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Run unit and integration tests.
22
#
3-
# Based on https://playwright.dev/docs/ci#via-containers.
3+
# Based on https://playwright.dev/docs/next/ci#github-actions.
44
name: Test
55
on:
66
push:
@@ -10,19 +10,14 @@ on:
1010
branches: main
1111
jobs:
1212
test:
13-
name: 'Test'
13+
timeout-minutes: 5
1414
runs-on: ubuntu-latest
15-
container:
16-
image: mcr.microsoft.com/playwright
17-
options: --user 1001
1815
steps:
1916
- uses: actions/checkout@v4
2017
- uses: actions/setup-node@v4
2118
with:
2219
node-version: lts/*
2320
- name: Install dependencies
24-
run: |
25-
npx playwright install --with-deps
26-
npm ci
27-
- name: Run tests
28-
run: npm run test
21+
run: npm ci
22+
- name: Run unit tests
23+
run: npx vitest --run

src/lib/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { TelemetryServiceMock } from './telemetry/service_mock';
1717

1818
const init_start = performance.now();
1919

20-
export const log = new Log(IS_PRODUCTION_BUILD ? Log.INFO : Log.TRACE);
20+
export const log = new Log(IS_PRODUCTION_BUILD ? Log.TRACE : Log.TRACE);
2121

2222
log.debug(init_start, 'Initializing...');
2323
log.debug('Config:', {

svelte.config.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ const config = {
1111
// adapter-auto only supports some environments, see https://svelte.dev/docs/kit/adapter-auto for a list.
1212
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
1313
// See https://svelte.dev/docs/kit/adapters for more information about adapters.
14-
adapter: adapter()
14+
adapter: adapter(),
15+
paths: {
16+
base: process.env.BASE_PATH || ''
17+
}
1518
}
1619
};
1720

0 commit comments

Comments
 (0)