fix: CI/CD test failures and invalid Go version

- Fix go.mod Go version from invalid 1.25.7 to 1.23
- Fix Dockerfile golang image from 1.25 to 1.23
- Add window.matchMedia mock for jsdom themeStore tests
- Exclude e2e/ from Vitest to prevent Playwright test conflicts
- Add frontend test step to both CI workflows
This commit is contained in:
Tomas Dvorak
2026-04-27 09:04:30 +02:00
parent eadacd9e66
commit a07fca997e
7 changed files with 229 additions and 77 deletions
+40 -4
View File
@@ -1,4 +1,4 @@
name: Build and Push Docker Image
name: Build, Test and Push Docker Image
on:
push:
@@ -13,7 +13,43 @@ env:
OWNER: betterandbetterii
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Run Go tests
run: go test ./... -v -count=1
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install frontend deps
run: cd frontend && npm ci --legacy-peer-deps
- name: Build frontend
run: cd frontend && npm run build
- name: Lint frontend
run: cd frontend && npm run typecheck
- name: Run frontend tests
run: cd frontend && npm test -- --run
build-and-push:
needs: test
runs-on: ubuntu-latest
permissions:
contents: read
@@ -51,11 +87,11 @@ jobs:
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
file: ./excalidraw-complete.Dockerfile
push: true
file: ./excalidraw-full.Dockerfile
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.IMAGE_NAME }}:buildcache