-
-
Notifications
You must be signed in to change notification settings - Fork 4
104 lines (93 loc) · 3.06 KB
/
ci.yml
File metadata and controls
104 lines (93 loc) · 3.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
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