Skip to content

fix(ci): build frontend before Go CI jobs #3

fix(ci): build frontend before Go CI jobs

fix(ci): build frontend before Go CI jobs #3

Workflow file for this run

name: Go Lint
permissions:
contents: read
on:
push:
branches:
- main
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- 'frontend/**'
- '.golangci.yml'
- '.github/workflows/go-lint.yaml'
pull_request:
branches:
- main
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- 'frontend/**'
- '.golangci.yml'
- '.github/workflows/go-lint.yaml'
workflow_dispatch:
jobs:
build-frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
working-directory: frontend
run: npm ci
- name: Build frontend
working-directory: frontend
run: npm run build
- name: Upload frontend artifacts
uses: actions/upload-artifact@v4
with:
name: frontend-dist-lint
path: internal/server/frontend/
retention-days: 1
lint:
needs: build-frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download frontend artifacts
uses: actions/download-artifact@v4
with:
name: frontend-dist-lint
path: internal/server/frontend/
- uses: actions/setup-go@v5
with:
go-version: stable
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest