Skip to content

Fix webui test & warnings #122

Fix webui test & warnings

Fix webui test & warnings #122

Workflow file for this run

name: build
on:
push:
tags: [v*]
branches: [master]
pull_request:
jobs:
# See https://github.com/mvdan/github-actions-golang
test:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.22.x, 1.23.x]
steps:
- name: Install Go@v${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
# See https://github.com/actions/cache/blob/master/examples.md#go---modules
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Test
run: go test ./...
test-webui:
runs-on: ubuntu-latest
defaults:
run:
working-directory: webui/internal/assets
# See https://docs.github.com/en/actions/guides/building-and-testing-nodejs
steps:
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Checkout code
uses: actions/checkout@v4
# See https://github.com/actions/cache/blob/master/examples.md#node---yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Test
run: yarn test