From 36b7fbe584d49257ba1081d8a6fc6dd7639bdf47 Mon Sep 17 00:00:00 2001 From: Anoop M D Date: Wed, 14 Feb 2024 04:58:54 +0530 Subject: [PATCH] feat: added gh workflow for testing bru cli from npm --- .github/workflows/npm-bru-cli.yml | 45 +++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/npm-bru-cli.yml diff --git a/.github/workflows/npm-bru-cli.yml b/.github/workflows/npm-bru-cli.yml new file mode 100644 index 0000000000..f51ab7e434 --- /dev/null +++ b/.github/workflows/npm-bru-cli.yml @@ -0,0 +1,45 @@ +name: Bru CLI Tests (npm) + +on: + workflow_dispatch: + inputs: + build: + description: 'Test Bru CLI (npm)' + required: true + default: 'true' + +# Assign permissions for unit tests to be reported. +# See https://github.com/dorny/test-reporter/issues/168 +permissions: + statuses: write + checks: write + contents: write + pull-requests: write + actions: write + +jobs: + test: + name: CLI Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + + - name: Install Bru CLI from NPM + run: npm install -g @usebruno/cli + + - name: Run tests + run: | + cd packages/bruno-tests/collection + npm install + bru run --env Prod --output junit.xml --format junit + + - name: Publish Test Report + uses: dorny/test-reporter@v1 + if: success() || failure() + with: + name: Test Report + path: packages/bruno-tests/collection/junit.xml + reporter: java-junit