mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-31 10:07:28 +01:00
* Remove 32bit builds * Use native Github runners * Fix arm builds not getting runner * Fix lint job
130 lines
3.3 KiB
YAML
130 lines
3.3 KiB
YAML
name: Frontend
|
|
|
|
permissions:
|
|
contents: read
|
|
actions: read
|
|
checks: write
|
|
pull-requests: write
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
working-directory: frontend
|
|
|
|
- name: Run Lint
|
|
run: pnpm run lint:ci
|
|
working-directory: frontend
|
|
|
|
- name: Run Typecheck
|
|
run: pnpm run typecheck
|
|
working-directory: frontend
|
|
|
|
integration-tests:
|
|
name: Integration Tests
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
postgres:
|
|
image: postgres:17
|
|
env:
|
|
POSTGRES_USER: homebox
|
|
POSTGRES_PASSWORD: homebox
|
|
POSTGRES_DB: homebox
|
|
ports:
|
|
- 5432:5432
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install Task
|
|
uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611
|
|
with:
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c
|
|
with:
|
|
go-version: "1.24"
|
|
cache-dependency-path: backend/go.mod
|
|
|
|
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f
|
|
with:
|
|
node-version: lts/*
|
|
|
|
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
working-directory: frontend
|
|
|
|
- name: Run Integration Tests
|
|
run: task test:ci
|
|
integration-tests-pgsql:
|
|
strategy:
|
|
matrix:
|
|
database_version: [17,16,15]
|
|
name: Integration Tests PGSQL ${{ matrix.database_version }}
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
postgres:
|
|
image: postgres:${{ matrix.database_version }}
|
|
env:
|
|
POSTGRES_USER: homebox
|
|
POSTGRES_PASSWORD: homebox
|
|
POSTGRES_DB: homebox
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
ports:
|
|
- 5432:5432
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install Task
|
|
uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611
|
|
with:
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c
|
|
with:
|
|
go-version: "1.24"
|
|
cache-dependency-path: backend/go.mod
|
|
|
|
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f
|
|
with:
|
|
node-version: lts/*
|
|
|
|
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install
|
|
working-directory: frontend
|
|
|
|
- name: Run Integration Tests
|
|
run: task test:ci:postgresql |