Skip to content

deps: bump the npm-minor-and-patch group with 15 updates #583

deps: bump the npm-minor-and-patch group with 15 updates

deps: bump the npm-minor-and-patch group with 15 updates #583

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize]
workflow_dispatch:
permissions:
contents: read
jobs:
scope:
name: Resolve validation scope
runs-on: ubuntu-latest
defaults:
run:
working-directory: cerebro-web
outputs:
needs_e2e: ${{ steps.scope.outputs.needs_e2e }}
needs_docker: ${{ steps.scope.outputs.needs_docker }}
steps:
- name: Checkout web
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
fetch-depth: 0
path: cerebro-web
- name: Resolve expensive validation scope
id: scope
env:
EVENT_NAME: ${{ github.event_name }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
AFTER_SHA: ${{ github.sha }}
run: node scripts/resolve-ci-scope.mjs
node-validation:
name: Node validation
needs: scope
runs-on: ubuntu-latest
defaults:
run:
working-directory: cerebro-web
steps:
- name: Checkout web
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
path: cerebro-web
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "22"
cache: npm
cache-dependency-path: cerebro-web/package-lock.json
- name: Install dependencies
run: npm ci
- name: Developer environment doctor
run: npm run doctor -- --ci
- name: Lint
run: npm run lint
- name: Unit tests
run: npm test
- name: Build
run: npm run build
- name: Standalone smoke
run: npm run smoke:standalone -- --skip-build
- name: OSS audit
run: npm run oss:audit
- name: High severity audit
run: npm run audit:high
local-grc-e2e:
name: Local GRC E2E
needs: scope
if: needs.scope.outputs.needs_e2e == 'true'
runs-on: ubuntu-latest
defaults:
run:
working-directory: cerebro-web
steps:
- name: Checkout web
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
path: cerebro-web
- name: Checkout Cerebro
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
with:
repository: writer/cerebro
ref: main
path: cerebro
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "22"
cache: npm
cache-dependency-path: cerebro-web/package-lock.json
- name: Setup Go
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version-file: cerebro/go.mod
cache: false
- name: Install dependencies
run: npm ci
- name: Install Playwright browser
run: npx playwright install --with-deps chromium
- name: Local GRC E2E
run: npm run e2e:grc:local -- --browser
env:
CEREBRO_REPO: ${{ github.workspace }}/cerebro
CEREBRO_GRC_E2E_BROWSER_PROVIDER: playwright
CEREBRO_GRC_E2E_RETAIN_ARTIFACTS: "1"
- name: Upload Local GRC E2E artifacts
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: local-grc-e2e-artifacts
path: |
/tmp/cerebro-grc-e2e-*/summary.json
/tmp/cerebro-grc-e2e-*/logs/**
/tmp/cerebro-grc-e2e-*/*.png
if-no-files-found: ignore
retention-days: 7
docker-build:
name: Docker build
needs: scope
if: needs.scope.outputs.needs_docker == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout web
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
- name: Set up Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: "22"
- name: Docker build
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
with:
context: .
pull: true
load: true
tags: cerebro-web:ci
cache-from: type=gha,scope=cerebro-web-ci
cache-to: type=gha,mode=max,scope=cerebro-web-ci
- name: Docker smoke
run: node scripts/smoke-docker.mjs cerebro-web:ci
validate:
name: validate
needs:
- node-validation
- local-grc-e2e
- docker-build
if: always()
runs-on: ubuntu-latest
steps:
- name: Check validation jobs
shell: bash
env:
NODE_VALIDATION_RESULT: ${{ needs.node-validation.result }}
E2E_RESULT: ${{ needs.local-grc-e2e.result }}
DOCKER_RESULT: ${{ needs.docker-build.result }}
run: |
set -euo pipefail
echo "node-validation=${NODE_VALIDATION_RESULT}"
echo "local-grc-e2e=${E2E_RESULT}"
echo "docker-build=${DOCKER_RESULT}"
if [ "${NODE_VALIDATION_RESULT}" != "success" ]; then
echo "Node validation failed or did not run" >&2
exit 1
fi
for result in "${E2E_RESULT}" "${DOCKER_RESULT}"; do
if [ "${result}" != "success" ] && [ "${result}" != "skipped" ]; then
echo "Expensive validation failed with result ${result}" >&2
exit 1
fi
done