mirror of
https://github.com/TecharoHQ/anubis.git
synced 2025-08-03 17:59:24 -04:00

Closes #125 Closes #40 Among other things, this moves all of the asset generation to run within the context of an npm script. Developer documentation stubs have been added so that people can get started more easily. The top-level Dockerfile (which is no longer used in production) has been removed as its presence has been causing confusion. This changeset will break it anyways. These changes will make for less "repo churn" as the static assets are built and rebuilt, at the cost of making the build step more complicated for downstream packagers. If this becomes a burden, we can explore making a "release tarball" that contains pre-massaged outputs.
82 lines
1.9 KiB
YAML
82 lines
1.9 KiB
YAML
name: Go
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
permissions:
|
|
contents: read
|
|
actions: write
|
|
|
|
jobs:
|
|
build:
|
|
#runs-on: alrest-techarohq
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: build essential
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y build-essential
|
|
|
|
- name: Set up Homebrew
|
|
uses: Homebrew/actions/setup-homebrew@master
|
|
|
|
- name: Setup Homebrew cellar cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
/home/linuxbrew/.linuxbrew/Cellar
|
|
/home/linuxbrew/.linuxbrew/bin
|
|
/home/linuxbrew/.linuxbrew/etc
|
|
/home/linuxbrew/.linuxbrew/include
|
|
/home/linuxbrew/.linuxbrew/lib
|
|
/home/linuxbrew/.linuxbrew/opt
|
|
/home/linuxbrew/.linuxbrew/sbin
|
|
/home/linuxbrew/.linuxbrew/share
|
|
/home/linuxbrew/.linuxbrew/var
|
|
key: ${{ runner.os }}-go-homebrew-cellar-${{ hashFiles('go.sum') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-go-homebrew-cellar-
|
|
|
|
- name: Install Brew dependencies
|
|
run: |
|
|
brew bundle
|
|
|
|
- name: Setup Golang caches
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cache/go-build
|
|
~/go/pkg/mod
|
|
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-golang-
|
|
|
|
- name: Cache playwright binaries
|
|
uses: actions/cache@v3
|
|
id: playwright-cache
|
|
with:
|
|
path: |
|
|
~/.cache/ms-playwright
|
|
key: ${{ runner.os }}-playwright-${{ hashFiles('**/go.sum') }}
|
|
|
|
- name: install playwright browsers
|
|
run: |
|
|
npx --yes playwright@1.50.1 install --with-deps
|
|
npx --yes playwright@1.50.1 run-server --port 3000 &
|
|
|
|
- name: install node deps
|
|
run: |
|
|
npm ci
|
|
npm run assets
|
|
|
|
- name: Build
|
|
run: go build ./...
|
|
|
|
- name: Test
|
|
run: npm run test
|