bruno/.github/workflows/tests.yml

87 lines
2.5 KiB
YAML
Raw Normal View History

2024-01-29 09:18:51 +01:00
name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
unit-test:
name: Unit Tests
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: npm ci --legacy-peer-deps
2024-01-29 13:12:27 +01:00
# build libraries
- name: Build libraries
run: |
npm run build --workspace=packages/bruno-common
npm run build --workspace=packages/bruno-query
# test
- name: Test Package bruno-query
run: npm run test --workspace=packages/bruno-query
- name: Test Package bruno-lang
run: npm run test --workspace=packages/bruno-lang
- name: Test Package bruno-schema
run: npm run test --workspace=packages/bruno-schema
- name: Test Package bruno-app
run: npm run test --workspace=packages/bruno-app
- name: Test Package bruno-js
run: npm run test --workspace=packages/bruno-js
- name: Test Package bruno-common
run: npm run test --workspace=packages/bruno-common
- name: Test Package bruno-cli
run: npm run test --workspace=packages/bruno-cli
- name: Test Package bruno-electron
run: npm run test --workspace=packages/bruno-electron
cli-test:
name: CLI Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
2024-01-29 09:21:37 +01:00
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: npm ci --legacy-peer-deps
- name: Build Libraries
run: |
npm run build --workspace=packages/bruno-query
npm run build --workspace=packages/bruno-common
- name: Run tests
run: |
2024-01-29 09:18:51 +01:00
cd packages/bruno-tests/collection
2024-01-30 17:56:47 +01:00
npm install
2024-01-29 09:18:51 +01:00
node ../../bruno-cli/bin/bru.js run --env Prod --output junit.xml --format junit
- name: Publish Test Report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Test Report
2024-01-29 09:33:31 +01:00
path: packages/bruno-tests/collection/junit.xml
reporter: java-junit
prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: npm ci --legacy-peer-deps
- name: Run Prettier
run: npm run test:prettier:web