From 9245a7aee2ce56c42c462808e15548178f4ad213 Mon Sep 17 00:00:00 2001 From: Tomasz Pluskiewicz Date: Wed, 8 Mar 2023 12:03:40 +0100 Subject: [PATCH] ci: a step to ensure all dependencies are added to combined package --- .github/check-deps.sh | 20 ++++++++++++++++++++ .github/workflows/node.js.yml | 8 ++++++++ 2 files changed, 28 insertions(+) create mode 100755 .github/check-deps.sh diff --git a/.github/check-deps.sh b/.github/check-deps.sh new file mode 100755 index 00000000..ff1925c2 --- /dev/null +++ b/.github/check-deps.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +VOCABS=$(jq '.name' ontologies/*/package.json) + +for vocab in $VOCABS +do + HAS_DEPENDENCY=$(grep "$vocab" packages/vocabularies/package.json) + if [ "$HAS_DEPENDENCY" ] + then + echo "✔ ${vocab}" + else + MISSING=true + echo "𝙭 ${vocab}" + fi +done + +if [ $MISSING ] +then + exit 1 +fi diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 26665695..c6896055 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -30,3 +30,11 @@ jobs: uses: coverallsapp/github-action@master with: github-token: ${{ secrets.GITHUB_TOKEN }} + + check-deps: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: sudo apt-get update + - run: sudo apt-get install jq + - run: .github/check-deps.sh