Skip to content

Appease the linter. #2014

Appease the linter.

Appease the linter. #2014

Workflow file for this run

# Copyright 2022-2024 the Lactoserv Authors (Dan Bornstein et alia).
# SPDX-License-Identifier: Apache-2.0
name: Lint / Build / Test
# Controls when the workflow will run.
on:
# Triggers the workflow on push or PR events for the branch `main`.
pull_request:
branches: [ "main" ]
push:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab.
workflow_dispatch:
# Workflow. Jobs run in parallel by default, but that is moot here: there's only
# one job.
jobs:
# Check dependencies.
check-dependencies:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Clone repo.
uses: actions/checkout@v4
- name: Check dependencies.
uses: actions/dependency-review-action@v4
with:
warn-only: true
# Use these if you want to run a "from-scratch" check.
# base-ref: 260014145f
# head-ref: HEAD
fail-on-scopes: runtime, unknown
show-openssf-scorecard: false
warn-on-openssf-scorecard-level: 2
allow-licenses: |
0BSD,
Apache-2.0,
BSD-2-Clause,
BSD-3-Clause,
BSD-3-Clause-Clear,
CC0-1.0,
CC-BY-3.0,
CC-BY-4.0,
ISC,
MIT,
Python-2.0,
Unlicense
# Build the project.
build:
runs-on: ubuntu-latest
steps:
- name: Get Node.
uses: actions/setup-node@v4
with:
node-version: '20.x'
# Note: Checks out into `$GITHUB_WORKSPACE`, which is also the `$CWD`.
- name: Clone repo.
uses: actions/checkout@v4
- name: Run the linter.
run: ./scripts/ubik dev lint
- name: Actually build.
run: ./scripts/ubik dev build distro
- name: Run the unit tests.
run: ./scripts/ubik run-tests
- name: Run the integration tests.
run: ./scripts/ubik run-tests --type=integration
- name: Run the unit tests, with coverage reporting.
run: |
./scripts/ubik run-tests --type=unit-coverage || {
echo 'Weird coverage-report failure (originally started happening'
echo '2024-05-17).'
}
- name: Ensure the cert creator still works.
run: ./scripts/ubik make-localhost-cert
- name: Tarball artifact.
uses: actions/upload-artifact@v4
with:
name: distro
path: out/lactoserv-*.tgz
if-no-files-found: error
overwrite: true
retention-days: 90
- name: node_modules artifact.
uses: actions/upload-artifact@v4
with:
name: node_modules
path: |
out/lactoserv/lib/node_modules
out/lactoserv/lib/package*.json
if-no-files-found: error
overwrite: true
retention-days: 90
- name: Announcement.
run: |
info="$(jq . out/lactoserv/product-info.json)"
printf '::notice title=product-info::%s\n' \
"$(awk <<<"${info}" '{ printf("%s%%0A", $0); }')"