From f50c0b953e795e61f6094eeb7732d413b5b1f793 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 | 20 ++++++++++++++++++++ .github/workflows/develop.yml | 13 +++++++++++++ .github/workflows/main.yml | 2 +- discard.txt | 1 + 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 discard.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 47effe9..e27d117 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,6 +44,26 @@ jobs: - name: Authenticate with private NPM package run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN_READ }}" > ~/.npmrc + - name: Ensure there is no .nprmc with tokens + run: cat ~/.npmrc + + - name: Ensure there is no .nprmc with tokens + run: rm -rf ~/.npmrc + + - name: Ensure there is no .nprmc with tokens + uses: GuillaumeFalourd/assert-command-line-output@v2.2 + with: + command_line: cat ~/.npmrc + assert_file_path: discard.txt + expected_result: PASSED + + - 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/exporter-output-files.txt + expected_result: PASSED + - name: Install dependencies run: npm i diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml index 0b6ba6d..a93a24c 100644 --- a/.github/workflows/develop.yml +++ b/.github/workflows/develop.yml @@ -32,6 +32,19 @@ jobs: ${{ runner.os }}-build- ${{ runner.os }}- + - name: Ensure there is no .nprmc with tokens + run: cat ~/.npmrc + + - name: Ensure there is no .nprmc with tokens + run: rm -rf ~/.npmrc + + - name: Ensure there is no .nprmc with tokens + uses: GuillaumeFalourd/assert-command-line-output@v2.2 + with: + command_line: cat ~/.npmrc + assert_file_path: 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/discard.txt b/discard.txt new file mode 100644 index 0000000..f89c2dd --- /dev/null +++ b/discard.txt @@ -0,0 +1 @@ +/home/runner/.npmrc: No such file or directory \ No newline at end of file