mirror of
https://github.com/strands-agents/harness-sdk.git
synced 2026-10-02 02:44:48 +08:00
Enable vitest test reports + upload artifacts (#325)
This way we can extract the test reports and view them offline Co-authored-by: Mackenzie Zastrow <zastrowm@users.noreply.github.com>
This commit is contained in:
co-authored by
Mackenzie Zastrow
parent
e2820486c5
commit
310d66da75
@@ -86,11 +86,12 @@ jobs:
|
||||
- name: Run integration tests
|
||||
run: npm run test:integ:all
|
||||
|
||||
- name: Upload browser test screenshots
|
||||
- name: Upload test artifacts
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: browser-test-screenshots
|
||||
path: tests_integ/browser/__screenshots__/
|
||||
name: test-artifacts-integ
|
||||
path: ./test/.artifacts/
|
||||
retention-days: 4
|
||||
include-hidden-files: true # needed because the path has a directory starting with a '.'
|
||||
if-no-files-found: ignore
|
||||
|
||||
@@ -40,6 +40,16 @@ jobs:
|
||||
- name: Run unit tests
|
||||
run: npm run test:all:coverage
|
||||
|
||||
- name: Upload test artifacts
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-artifacts-${{ matrix.node-version }}-${{ matrix.os }}
|
||||
path: ./test/.artifacts/
|
||||
include-hidden-files: true # needed because the path has a directory starting with a '.'
|
||||
retention-days: 4
|
||||
if-no-files-found: ignore
|
||||
|
||||
- name: Run linting
|
||||
run: npm run lint
|
||||
|
||||
|
||||
+4
-1
@@ -37,4 +37,7 @@ Thumbs.db
|
||||
.env.production.local
|
||||
|
||||
# Github workflow artifacts
|
||||
.artifact
|
||||
.artifact
|
||||
|
||||
# Test artifacts
|
||||
test/.artifacts
|
||||
@@ -23,6 +23,11 @@ const getOpenAIAPIKey: BrowserCommand<[], string | undefined> = async ({ testPat
|
||||
export default defineConfig({
|
||||
test: {
|
||||
unstubEnvs: true,
|
||||
reporters: [
|
||||
'default',
|
||||
['junit', { outputFile: 'test/.artifacts/test-report/junit/report.xml' }],
|
||||
['json', { outputFile: 'test/.artifacts/test-report/json/report.json' }],
|
||||
],
|
||||
projects: [
|
||||
{
|
||||
test: {
|
||||
@@ -43,6 +48,7 @@ export default defineConfig({
|
||||
browser: {
|
||||
enabled: true,
|
||||
provider: playwright(),
|
||||
screenshotDirectory: 'test/.artifacts/browser-screenshots/',
|
||||
instances: [
|
||||
{
|
||||
browser: 'chromium',
|
||||
@@ -72,6 +78,7 @@ export default defineConfig({
|
||||
browser: {
|
||||
enabled: true,
|
||||
provider: playwright(),
|
||||
screenshotDirectory: 'test/.artifacts/browser-screenshots/',
|
||||
instances: [
|
||||
{
|
||||
browser: 'chromium',
|
||||
|
||||
Reference in New Issue
Block a user