Skip to content

Improve error message when test attempts to resolve a non-schema #370

Improve error message when test attempts to resolve a non-schema

Improve error message when test attempts to resolve a non-schema #370

Workflow file for this run

name: JSON Schema
on:
pull_request:
jobs:
test:
strategy:
fail-fast: false
matrix:
platform:
- os: ubuntu-22.04
cc: clang
cxx: clang++
shell: sh
- os: ubuntu-22.04
cc: gcc
cxx: g++
shell: sh
- os: macos-13
cc: clang
cxx: clang++
shell: sh
- os: macos-14
cc: clang
cxx: clang++
shell: sh
- os: windows-latest
shell: pwsh
defaults:
run:
shell: ${{ matrix.platform.shell }}
runs-on: ${{ matrix.platform.os }}
env:
CC: ${{ matrix.platform.cc }}
CXX: ${{ matrix.platform.cxx }}
steps:
- name: Install ClangFormat
run: pipx install clang-format==19.1.0
- uses: actions/checkout@v4
- name: Install dependencies (macOS)
if: runner.os == 'macos'
run: brew bundle
env:
HOMEBREW_NO_ANALYTICS: 1
HOMEBREW_NO_AUTO_UPDATE: 1
- name: Install dependencies (Windows)
if: runner.os == 'windows'
run: choco install shellcheck
- run: cmake --version
- name: Configure JSON Schema
run: >
cmake -S . -B ./build
-DCMAKE_BUILD_TYPE:STRING=Release
-DJSONSCHEMA_TESTS:BOOL=ON
-DJSONSCHEMA_TESTS_CI:BOOL=ON
-DJSONSCHEMA_DEVELOPMENT:BOOL=ON
-DBUILD_SHARED_LIBS:BOOL=OFF
-DCMAKE_COMPILE_WARNING_AS_ERROR:BOOL=ON
- run: cmake --build ./build --config Release --target clang_format_test
- run: cmake --build ./build --config Release --target shellcheck
- run: cmake --build ./build --config Release --parallel 4
- run: >
cmake --install ./build --prefix ./build/dist --config Release --verbose
--component sourcemeta_jsonschema
# Not every CTest version supports the --test-dir option. If such option
# is not recognized, `ctest` will successfully exit finding no tests.
# Better to be sure and `cd` all the time here.
- run: cd ./build && ctest --build-config Release --output-on-failure --parallel
- run: cpack --config build/CPackConfig.cmake -B build/out -C Release
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: docker build --tag jsonschema .
- run: docker run --interactive --volume "$PWD:/schema" jsonschema
- run: ./test/docker/help.sh
- run: ./test/docker/bundle_fmt.sh