-
Notifications
You must be signed in to change notification settings - Fork 3
53 lines (53 loc) · 1.8 KB
/
bowtie.yml
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
name: Bowtie
on:
push:
branches:
- '*'
pull_request:
branches:
- main
jobs:
bowtie-report:
runs-on: blacksmith-2vcpu-ubuntu-2204
steps:
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Bowtie
run: pip install bowtie-json-schema==2023.8.16
- uses: actions/checkout@v4
with:
submodules: true
- name: Coursier cache
uses: useblacksmith/coursier-cache-action@v6
- uses: coursier/setup-action@v1
with:
jvm: zulu:11.0.10
apps: sbt scala
- name: Build Docker image
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: sbt 'set dockerEntrypoint := Seq("/opt/docker/bin/bowtie-validator"); set dockerUpdateLatest := true; Docker/publishLocal'
- name: Tag image
run: docker tag jsonoid-discovery:latest localhost/jsonoid-discovery
- name: Run Bowtie tests
run: mkdir bowtie && bowtie suite -V -i localhost/jsonoid-discovery JSON-Schema-Test-Suite/tests/draft2020-12/ > bowtie/bowtie.json
- name: Generate Bowtie report
run: (cd bowtie; bowtie report -b badges bowtie.json)
- name: Upload report artifact
uses: actions/upload-artifact@v4
with:
name: bowtie-report
path: bowtie/
- name: Link Bowtie report and readme
run: (cd bowtie; cp ../BOWTIE-README.md ./README.md; ln -sf bowtie-report.html index.html)
- name: Publish report to GitHub pages
uses: cpina/[email protected]
env:
SSH_DEPLOY_KEY: ${{ secrets.BOWTIE_SSH_DEPLOY_KEY }}
with:
source-directory: bowtie
destination-github-username: dataunitylab
destination-repository-name: jsonoid-bowtie
target-branch: gh-pages
create-target-branch-if-needed: true