Some checks failed
Publish Edge Images / images (apps/console/Dockerfile, barkstack) (push) Has started running
Publish Edge Images / images (services/treatvault/Dockerfile, treatvault) (push) Has been cancelled
Publish Edge Images / images (services/pawsql/Dockerfile, pawsql) (push) Has started running
Test and Release Barkstack / test (push) Has been cancelled
Test and Release Barkstack / release (push) Has been cancelled
Verify Platform / verify (push) Has been cancelled
Verify Platform / images (apps/console/Dockerfile, console) (push) Has been cancelled
Verify Platform / images (services/pawsql/Dockerfile, pawsql) (push) Has been cancelled
Verify Platform / images (services/treatvault/Dockerfile, treatvault) (push) Has been cancelled
73 lines
2.4 KiB
YAML
73 lines
2.4 KiB
YAML
name: Verify Platform
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
verify:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
env:
|
|
REPO_URL: https://cloud.campbellwireless.net/git/${{ github.repository }}.git
|
|
run: |
|
|
set -eux
|
|
git init .
|
|
git remote add origin "$REPO_URL"
|
|
auth="$(printf '%s' '${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}' | base64 | tr -d '\n')"
|
|
git config --local http.https://cloud.campbellwireless.net/.extraheader "AUTHORIZATION: basic $auth"
|
|
git fetch --prune --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*
|
|
git checkout --detach "${{ github.sha }}"
|
|
|
|
- name: Set up Bun
|
|
uses: oven-sh/setup-bun@v2
|
|
|
|
- name: Set up Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
|
|
- name: Test and build embedded web interfaces
|
|
run: |
|
|
for ui in apps/console/ui services/pawsql/ui services/treatvault/ui; do
|
|
(cd "$ui" && bun install --frozen-lockfile && bun run test && bun run build)
|
|
done
|
|
|
|
- name: Test unified Go module
|
|
run: |
|
|
go test ./...
|
|
go test -tags uiassets ./...
|
|
|
|
|
|
images:
|
|
needs: verify
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- name: console
|
|
dockerfile: apps/console/Dockerfile
|
|
- name: pawsql
|
|
dockerfile: services/pawsql/Dockerfile
|
|
- name: treatvault
|
|
dockerfile: services/treatvault/Dockerfile
|
|
steps:
|
|
- name: Checkout
|
|
env:
|
|
REPO_URL: https://cloud.campbellwireless.net/git/${{ github.repository }}.git
|
|
run: |
|
|
set -eux
|
|
git init .
|
|
git remote add origin "$REPO_URL"
|
|
auth="$(printf '%s' '${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}' | base64 | tr -d '\n')"
|
|
git config --local http.https://cloud.campbellwireless.net/.extraheader "AUTHORIZATION: basic $auth"
|
|
git fetch --prune --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*
|
|
git checkout --detach "${{ github.sha }}"
|
|
|
|
- name: Build ${{ matrix.name }} image
|
|
run: docker build --build-arg VERSION=ci -f "${{ matrix.dockerfile }}" -t "barkstack-${{ matrix.name }}:ci" .
|