Skip to content

Use a single lock in indexing dispatches #1655

Use a single lock in indexing dispatches

Use a single lock in indexing dispatches #1655

Workflow file for this run

name: Sourcemeta One CI
on:
schedule:
# Once per day, Monday to Friday
- cron: '0 19 * * 1-5'
push:
branches:
- main
pull_request:
concurrency:
group: one-ci-${{ github.ref }}
cancel-in-progress: true
jobs:
codespell:
runs-on: ubuntu-latest
steps:
- run: sudo apt-get update && sudo apt-get install --yes codespell
- uses: actions/checkout@v4
- run: codespell docs *.markdown docs/*.md
test:
strategy:
fail-fast: false
matrix:
edition:
- name: community
options: ENTERPRISE=OFF
- name: enterprise
options: ENTERPRISE=ON
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: make docker-build PRESET=Release ${{ matrix.edition.options }}
- name: SBOM (Enterprise)
run: |
node ./enterprise/scripts/sbom.js one /tmp/sbom.spdx.json
cat /tmp/sbom.spdx.json
npx --yes @sourcemeta/jsonschema validate \
vendor/spdx/schemas/spdx-schema.json /tmp/sbom.spdx.json --verbose
if: matrix.edition.name == 'enterprise'
- name: E2E (empty)
uses: ./.github/actions/e2e
with:
path: test/e2e/empty
edition: ${{ matrix.edition.name }}
- name: E2E (headless)
uses: ./.github/actions/e2e
with:
path: test/e2e/headless
edition: ${{ matrix.edition.name }}
- name: E2E (html)
uses: ./.github/actions/e2e
with:
path: test/e2e/html
edition: ${{ matrix.edition.name }}
- name: E2E (chaos)
uses: ./.github/actions/e2e
with:
path: test/e2e/chaos
edition: ${{ matrix.edition.name }}
- name: E2E (enterprise)
uses: ./.github/actions/e2e
with:
path: enterprise/e2e/html
edition: ${{ matrix.edition.name }}
if: matrix.edition.name == 'enterprise'
# Public instance
- run: docker build . --file public/Dockerfile --progress plain
if: matrix.edition.name == 'enterprise'
- name: Benchmark
run: |
make docker-benchmark PRESET=Release ${{ matrix.edition.options }}
docker run --rm one-benchmark > benchmark.json
- uses: benchmark-action/github-action-benchmark@v1
if: github.event.pull_request.head.repo.fork == false
with:
name: Benchmark Index (${{ matrix.edition.name }})
tool: customSmallerIsBetter
output-file-path: benchmark.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: ${{ github.event_name != 'pull_request' }}
benchmark-data-dir-path: benchmark/${{ matrix.edition.name }}/index
alert-threshold: '5%'
comment-always: true
fail-on-alert: false
website:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: pip install mkdocs-material
- run: mkdocs build --config-file mkdocs.yml --strict --site-dir ./build/website