Skip to content

Introduce a build pipeline for the Log Viewer #368

Introduce a build pipeline for the Log Viewer

Introduce a build pipeline for the Log Viewer #368

Workflow file for this run

name: Build Log Viewer
on:
push:
branches:
- main
pull_request:
branches:
- "*"
jobs:
prettier:
runs-on: ubuntu-latest
defaults:
run:
working-directory: src/inspect_ai/_view/www
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22.x"
- name: Install dependencies
run: yarn install
- name: Check prettier
run: yarn prettier:check
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: src/inspect_ai/_view/www
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22.x"
- name: Install dependencies
run: yarn install
- name: Run eslint
run: yarn eslint
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: src/inspect_ai/_view/www
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22.x"
- name: Install dependencies
run: yarn install
- name: Build log viewer
run: yarn build
- name: Ensure dist changes are checked in
run: |
if [[ $(git status --porcelain) != "" ]]
then
echo "Log viewer dist files have not been updated, please run yarn build and check in the changes."
exit 1
fi