Merge pull request #15 from HarperFast/tests/more-and-better-unit-tests #74
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Integration Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| node-version: | |
| description: 'Node.js version' | |
| required: true | |
| type: choice | |
| default: 'all' | |
| options: | |
| - 'all' | |
| - '20' | |
| - '22' | |
| - '24' | |
| jobs: | |
| integration-test: | |
| name: Integration Test (Node.js v${{ matrix.node-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: ${{ (github.event.inputs.node-version == 'all' || github.event.inputs.node-version == '') && fromJSON('[20, 22, 24]') || fromJSON(format('[{0}]', github.event.inputs.node-version)) }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| package-manager-cache: false | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build | |
| run: npm run build || true # we currently have type errors so just ignore that | |
| - name: Setup Harper | |
| env: | |
| DEFAULTS_MODE: 'dev' | |
| HDB_ADMIN_USERNAME: 'admin' | |
| HDB_ADMIN_PASSWORD: 'password' | |
| ROOTPATH: '/tmp/hdb' | |
| OPERATIONSAPI_NETWORK_PORT: 9925 | |
| LOGGING_LEVEL: 'debug' | |
| LOGGING_STDSTREAMS: true | |
| THREADS_COUNT: 1 | |
| THREADS_DEBUG: false | |
| NODE_HOSTNAME: 'localhost' | |
| run: node --enable-source-maps ./dist/bin/harperdb.js install | |
| - name: Run tests | |
| env: | |
| HDB_ADMIN_USERNAME: 'admin' | |
| HDB_ADMIN_PASSWORD: 'password' | |
| run: | | |
| node --enable-source-maps ./dist/bin/harperdb.js start | |
| sleep 10 | |
| npm run test:integration | |
| - name: Upload HarperDB logs | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: harper-logs-node-${{ matrix.node-version }} | |
| path: /tmp/hdb/log/hdb.log | |
| retention-days: 7 |