From 5786ca27fb886ea6a7844b41a1186aecd018161d Mon Sep 17 00:00:00 2001 From: Jannis R Date: Thu, 21 Dec 2023 18:13:19 +0100 Subject: [PATCH] =?UTF-8?q?CI:=20adapt=20to=20workspace=20repo=20structure?= =?UTF-8?q?=20=F0=9F=92=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit follow-up of e5900c5 follow-up of 741474e --- .github/workflows/test.yml | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1bebf06..2f37a8d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,11 +28,25 @@ jobs: - run: npm install --workspaces - run: npm run lint + - run: npm run build - run: npm test - - name: test-install ffmpeg-static as dependency + + - name: test-install each package in the workspace as dependency run: | - file=$(npm pack -s) && file=$(realpath $file) - cd $(mktemp -d) && npm init -y - npm i "$file" - file $(node -p 'require("ffmpeg-static")') - $(node -p 'require("ffmpeg-static")') --help + set -u + set -o pipefail + set -x + + ls -al packages + for path in packages/*; do + pkg="$(basename "$path")" + tgz="$(realpath $(npm pack -s --workspace "$pkg" | xargs))" + + pushd . + cd "$(mktemp -d)" + npm init -y + npm i "$tgz" + file "$(node -p "require('$pkg')")" + "$(node -p "require('$pkg')")" -L + popd + done