From 9bcfd3e13a7c859322a56ffe10ea6c270df92b49 Mon Sep 17 00:00:00 2001 From: Sergii Golyshev Date: Tue, 28 Nov 2023 14:08:41 +0200 Subject: [PATCH] CI: Test --- .github/workflows/build.yml | 3 +++ .github/workflows/develop.yml | 9 ++++++++- .github/workflows/main.yml | 2 +- test-resources/discard.txt | 1 + 4 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 test-resources/discard.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 47effe9..a98346f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,6 +41,9 @@ jobs: ${{ runner.os }}-build- ${{ runner.os }}- + - name: Build local exporter + run: cd ${{ github.workspace }}/test-resources/exporter && npm i && npm run build && cd ${{ github.workspace }} + - name: Authenticate with private NPM package run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN_READ }}" > ~/.npmrc diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 0b6ba6d..1e973f5 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -31,7 +31,14 @@ jobs: ${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build- ${{ runner.os }}- - + + - name: Ensure there is no .nprmc with tokens + uses: GuillaumeFalourd/assert-command-line-output@v2.2 + with: + command_line: cat ~/.npmrc + assert_file_path: ${{ github.workspace }}/test-resources/discard.txt + expected_result: PASSED + - name: Install Supernova CLI dependency run: npm install --g @supernovaio/cli diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b2c1629..ab509eb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: name: Install CLI @PROD +name: Install CLI @PROD on: # push: diff --git a/test-resources/discard.txt b/test-resources/discard.txt new file mode 100644 index 0000000..fba6a98 --- /dev/null +++ b/test-resources/discard.txt @@ -0,0 +1 @@ +cat: /home/runner/.npmrc: No such file or directory