Skip to content

feat: adding github action to run all tests #4804

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/run-all-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Manual Flowise Test Run

on:
workflow_dispatch:
permissions:
checks: write
pull-requests: write
contents: read

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install pnpm
run: npm install -g pnpm

- name: Install dependencies
run: pnpm install

- name: Build modules
run: pnpm build
env:
NODE_OPTIONS: '--max_old_space_size=4096'

- name: Run tests
run: pnpm test

- name: Upload all test result artifacts
uses: actions/upload-artifact@v4
with:
name: all-test-results
path: '**/test-results/*.xml'

- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: '**/test-results/*.xml'
13 changes: 12 additions & 1 deletion packages/server/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,16 @@ module.exports = {
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],

// Display individual test results with the test suite hierarchy.
verbose: true
verbose: true,

reporters: [
'default',
[
'jest-junit',
{
outputDirectory: 'test-results',
outputName: 'results.xml'
}
]
]
}
1 change: 1 addition & 0 deletions packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@
"concurrently": "^7.1.0",
"cypress": "^13.13.0",
"jest": "^29.7.0",
"jest-junit": "^16.0.0",
"nodemon": "^2.0.22",
"oclif": "^3",
"rimraf": "^5.0.5",
Expand Down
Loading