Bump @types/node from 20.19.11 to 24.7.0 in /frontend #59
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Test | |
on: | |
push: | |
branches: ["*"] | |
pull_request: | |
branches: ["*"] | |
jobs: | |
test-backend: | |
name: Test Go Backend | |
runs-on: [self-hosted, home] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.21' | |
cache: true | |
- name: Install dependencies | |
run: go mod download | |
- name: Run tests | |
run: go test -v -race -coverprofile=coverage.out ./... | |
- name: Generate coverage report | |
run: go tool cover -html=coverage.out -o coverage.html | |
- name: Upload coverage reports | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-report | |
path: | | |
coverage.out | |
coverage.html | |
- name: Build simulator binary | |
run: | | |
CGO_ENABLED=1 GOOS=linux go build -a -installsuffix cgo -o bin/simulator ./cmd/simulator | |
CGO_ENABLED=1 GOOS=linux go build -a -installsuffix cgo -o bin/test-charger ./cmd/test-charger | |
- name: Upload backend artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: backend-binaries | |
path: bin/ | |
test-frontend: | |
name: Test Frontend | |
runs-on: [self-hosted, home] | |
defaults: | |
run: | |
working-directory: ./frontend | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '24' | |
cache: 'npm' | |
cache-dependency-path: './frontend/package-lock.json' | |
- name: Install dependencies | |
run: npm ci | |
- name: Run linter | |
run: npm run lint | |
- name: Build frontend | |
run: npm run build | |
- name: Upload frontend build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: frontend-build | |
path: frontend/.next/ | |
integration-test: | |
name: Integration Tests | |
runs-on: [self-hosted, home] | |
needs: [test-backend, test-frontend] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.21' | |
cache: true | |
- name: Install dependencies | |
run: go mod download | |
- name: Check for compile warnings | |
run: | | |
# Vet checks for suspicious constructs | |
go vet ./... | |
# Build with warnings as errors | |
go build -buildvcs=false ./... | |
- name: Run integration tests | |
run: go test -v ./tests/... |