ci: Merge testing actions
This commit is contained in:
		
							parent
							
								
									c549f51c49
								
							
						
					
					
						commit
						f2d165aa60
					
				
					 1 changed files with 56 additions and 0 deletions
				
			
		
							
								
								
									
										56
									
								
								.github/workflows/testing.yml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								.github/workflows/testing.yml
									
										
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,56 @@ | ||||||
|  | name: Combined Testing | ||||||
|  | 
 | ||||||
|  | on: | ||||||
|  |     push: | ||||||
|  |         branches: [ "dev" ] | ||||||
|  |     pull_request: | ||||||
|  |         branches: [ "dev" ] | ||||||
|  |         types: ["synchronize", "ready_for_review", "opened", "reopened"] | ||||||
|  | 
 | ||||||
|  | jobs: | ||||||
|  |     backend-test: | ||||||
|  |         name: Run backend unit tests | ||||||
|  |         if: "! github.event.pull_request.draft" | ||||||
|  |         runs-on: [self-hosted, Linux, X64] | ||||||
|  |         strategy: | ||||||
|  |             matrix: | ||||||
|  |                 node-version: [22.x] | ||||||
|  |         steps: | ||||||
|  |             - uses: actions/checkout@v4 | ||||||
|  |             - name: Use Node.js ${{ matrix.node-version }} | ||||||
|  |               uses: actions/setup-node@v4 | ||||||
|  |               with: | ||||||
|  |                   node-version: ${{ matrix.node-version }} | ||||||
|  |                   cache: 'npm' | ||||||
|  |             - run: npm ci | ||||||
|  |             - run: npm run test:unit -w backend | ||||||
|  |         paths: | ||||||
|  |             - 'backend/src/**.[jt]s' | ||||||
|  |             - 'backend/tests/**.[jt]s' | ||||||
|  |             - 'backend/vitest.config.ts' | ||||||
|  | 
 | ||||||
|  |     frontend-test: | ||||||
|  |         name: Run frontend unit tests | ||||||
|  |         if: "! github.event.pull_request.draft" | ||||||
|  |         runs-on: [self-hosted, Linux, X64] | ||||||
|  |         strategy: | ||||||
|  |             matrix: | ||||||
|  |                 node-version: [22.x] | ||||||
|  |         steps: | ||||||
|  |             - uses: actions/checkout@v4 | ||||||
|  |             - name: Use Node.js ${{ matrix.node-version }} | ||||||
|  |               uses: actions/setup-node@v4 | ||||||
|  |               with: | ||||||
|  |                   node-version: ${{ matrix.node-version }} | ||||||
|  |                   cache: 'npm' | ||||||
|  |             - run: npm ci | ||||||
|  |             - run: npm run test:unit -w frontend | ||||||
|  |         paths: | ||||||
|  |             - 'frontend/src/**.[jt]s' | ||||||
|  |             - 'frontend/src/**.vue' | ||||||
|  |             - 'frontend/src/**.css' | ||||||
|  |             - 'frontend/tests/**.[jt]s' | ||||||
|  |             - 'frontend/tests/**.vue' | ||||||
|  |             - 'frontend/tests/**.css' | ||||||
|  |             - 'frontend/vitest.config.ts' | ||||||
|  |             - 'frontend/playwright.config.ts' | ||||||
		Reference in a new issue