Files
reloading-manager/.gitea/workflows/tests.yml
Ron Rise 74b183be72
Some checks failed
🧪 ✨ Unit Tests Workflow / 🧪 📜 JavaScript Tests (push) Successful in 2m5s
🧪 ✨ Unit Tests Workflow / 🔍 🐹 Go Tests (push) Successful in 4m7s
🧪 ✨ Unit Tests Workflow / 🧪 🐹 GolangCI-Lint (push) Failing after 5m0s
Does anyone read this? I'll be at the coffee shop accross the street.
2025-06-10 08:39:52 -04:00

95 lines
2.8 KiB
YAML

on:
workflow_dispatch:
inputs:
test:
description: 'Run tests'
required: true
default: 'true'
push:
branches:
- "*"
name: 🧪 ✨ Unit Tests Workflow
jobs:
build-javascript:
name: 🧪 📜 JavaScript Tests
runs-on: ubuntu-latest
steps:
- name: 🛡️ 🔒 Add Siteworx CA Certificates
run: |
apt update && apt install -yq ca-certificates curl
curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt
update-ca-certificates
- name: 📖 🔍 Checkout Repository Code
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: ⚙️ 🔧 Set up Node.js Environment
uses: actions/setup-node@v2
with:
node-version: '22.14.0'
- name: 📦 📥 Install Dependencies
run: |
cd frontend
npm install
- name: ✅ 🧪 Run JavaScript Tests
run: |
cd frontend
npm run build
golangci-lint:
name: 🧪 🐹 GolangCI-Lint
runs-on: ubuntu-latest
steps:
- name: 🛡️ 🔒 Add Siteworx CA Certificates
run: |
apt update && apt install -yq ca-certificates curl
curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt
update-ca-certificates
- name: 📖 🔍 Checkout Repository Code
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: ⚙️ 🐹 Set up Go Environment
uses: actions/setup-go@v2
with:
go-version: '1.24.3'
cache: true
- name: 📦 📥 Install GolangCI-Lint
run: |
go install github.com/golangci/golangci-lint@latest
- name: ✅ 🧪 Run GolangCI-Lint
run: |
cd backend
golangci-lint run --timeout 5m --config .golangci.yml
test-go:
env:
GOPRIVATE: 'git.siteworxpro.com'
GOPROXY: 'direct'
name: 🔍 🐹 Go Tests
runs-on: ubuntu-latest
steps:
- name: 🛡️ 🔒 Add Siteworx CA Certificates
run: |
apt update && apt install -yq ca-certificates curl
curl -Ls https://siteworxpro.com/hosted/Siteworx+Root+CA.pem -o /usr/local/share/ca-certificates/sw.crt
update-ca-certificates
- name: ⚙️ 🐹 Set up Go Environment
uses: actions/setup-go@v2
with:
go-version: '1.24.3'
cache: true
- name: 📖 🔍 Checkout Repository Code
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: 📦 📥 Install Dependencies
run: |
cd backend
go mod download
- name: ✅ 🔍 Run Go Tests
run: |
cd backend
go test -v ./... -coverprofile=coverage.out