Skip to content

Commit

Permalink
test manifest in CI (it's slow)
Browse files Browse the repository at this point in the history
  • Loading branch information
incognitojam committed Mar 2, 2025
1 parent d032e97 commit 6846014
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,16 @@ jobs:

- run: bun install
- run: bun lint
- run: bun vitest
- run: bun run test

manifest:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1

- run: bun install
- run: bun run test "manifest"
env:
FULL_MANIFEST: true
7 changes: 6 additions & 1 deletion src/utils/manifest.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import * as Comlink from 'comlink'
import config from '../config'
import { getManifest } from './manifest'

const FULL_MANIFEST = import.meta.env.FULL_MANIFEST === 'true'

globalThis.navigator = {
storage: {
estimate: vi.fn().mockImplementation(() => ({ quota: 10 * (1024 ** 3) })),
Expand Down Expand Up @@ -60,7 +62,10 @@ for (const [branch, manifestUrl] of Object.entries(config.manifests)) {

test('download', async () => {
await imageWorker.downloadImage(image)
}, { skip: image.name === 'system', timeout: 8 * 1000 })
}, {
skip: image.name === 'system' && !FULL_MANIFEST,
timeout: (image.name === 'system' ? 1200 : 8) * 1000,
})
})
}
})
Expand Down

0 comments on commit 6846014

Please sign in to comment.