Skip to content

Fix API spec to match the actual hexpm implementation and add CI #2

Fix API spec to match the actual hexpm implementation and add CI

Fix API spec to match the actual hexpm implementation and add CI #2

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Build and install drafter
run: |
git clone --branch v5.1.0 --depth 1 --recursive https://github.com/apiaryio/drafter.git /tmp/drafter
cd /tmp/drafter
# Fix missing <cstdint> include for GCC 13+
sed -i '1i #include <cstdint>' packages/drafter/src/utils/so/JsonIo.cc
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --target drafter
sudo cp build/drafter /usr/local/bin/
- name: Validate API Blueprint
run: |
output=$(drafter -l apiary.apib 2>&1)
echo "$output"
if echo "$output" | grep -q "warning:"; then
echo "::error::API Blueprint has warnings"
exit 1
fi