2024-02-14 00:28:54 +01:00
|
|
|
name: Bru CLI Tests (npm)
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2024-02-14 00:39:25 +01:00
|
|
|
- name: Display Bru CLI Version
|
|
|
|
run: bru --version
|
|
|
|
|
2024-02-14 00:28:54 +01:00
|
|
|
- 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
|