1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-06-04 01:18:20 +02:00

fix(ci): update config to make GHA reporting be better

This commit is contained in:
Christopher Kolstad 2025-05-16 14:51:45 +02:00
parent a08db953b8
commit 8afaf7e88b
No known key found for this signature in database
3 changed files with 21 additions and 16 deletions

View File

@ -18,7 +18,7 @@ jobs:
name: build name: build
permissions: permissions:
contents: read contents: read
# Needed for the github-reporter from vite to make comments on PRs # Needed for the github-reporter from vitest to make comments on PRs
pull-requests: write pull-requests: write
services: services:
# Label used to access the service container # Label used to access the service container

View File

@ -9,14 +9,16 @@ on:
- website/** - website/**
- frontend/** - frontend/**
- coverage/** - coverage/**
pull_request:
paths-ignore:
- website/**
- frontend/**
- coverage/**
jobs: jobs:
coverage: coverage:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
services: services:
# Label used to access the service container # Label used to access the service container
postgres: postgres:
@ -35,7 +37,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }} - name: Use Node.js 22
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: 22.x node-version: 22.x

View File

@ -5,17 +5,20 @@ export default defineConfig({
globals: true, globals: true,
globalSetup: ['./src/test-setup.ts'], globalSetup: ['./src/test-setup.ts'],
setupFiles: ['./src/test/errorWithMessage.ts'], setupFiles: ['./src/test/errorWithMessage.ts'],
reporters: [ reporters: process.env.GITHUB_ACTIONS
[ ? [
'junit', ['dot'],
{ [
suiteName: 'Unleash Unit Tests', 'junit',
outputFile: 'reports/jest-junit.xml', {
classnameTemplate: '{filename} - {filepath}', suiteName: 'Unleash Unit Tests',
}, outputFile: 'reports/jest-junit.xml',
], classnameTemplate: '{filename} - {filepath}',
['default'], },
], ],
['github-actions'],
]
: [['default']],
testTimeout: 30000, testTimeout: 30000,
exclude: [ exclude: [
...configDefaults.exclude, ...configDefaults.exclude,