Fix doc. #2168
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright 2022-2025 the Lactoserv Authors (Dan Bornstein et alia). | |
| # SPDX-License-Identifier: Apache-2.0 | |
| name: Main | |
| # 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. | |
| jobs: | |
| # Check dependencies. | |
| check-dependencies: | |
| name: 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 | |
| env: | |
| MAIN_NODE_VERSION: '24.x' # Which version to use for the full build. | |
| strategy: | |
| matrix: | |
| node: ['20.x', '22.x', '24.x'] | |
| include: | |
| - node: '24.x' | |
| fullBuild: true | |
| name: Build with Node v${{ matrix.node }} | |
| steps: | |
| - name: Get Node v${{ matrix.node }}. | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| # 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. | |
| if: matrix.fullBuild == true | |
| 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. | |
| if: matrix.fullBuild == true | |
| run: ./scripts/ubik make-localhost-cert | |
| - name: Tarball artifact. | |
| if: matrix.fullBuild == true | |
| 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. | |
| if: matrix.fullBuild == true | |
| 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. | |
| if: matrix.fullBuild == true | |
| run: | | |
| info="$(jq . out/lactoserv/product-info.json)" | |
| printf '::notice title=product-info::%s\n' \ | |
| "$(awk <<<"${info}" '{ printf("%s%%0A", $0); }')" |