Skip to content

Commit 7702559

Browse files
committed
Parallelize cucumber tests using GitHub Actions matrix
1 parent 200fd58 commit 7702559

File tree

2 files changed

+44
-2
lines changed

2 files changed

+44
-2
lines changed

.github/workflows/osrm-backend.yml

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,17 @@ jobs:
567567
npm run nodejs-tests
568568
fi
569569
popd
570-
npm test
570+
npm run lint
571+
572+
- name: Upload cucumber test artifacts
573+
if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY != 'ON' && contains(fromJson('["clang-18-release", "gcc-14-release", "conan-linux-release"]'), matrix.name) }}
574+
uses: actions/upload-artifact@v4
575+
with:
576+
name: cucumber-artifacts-${{ matrix.name }}
577+
path: |
578+
lib/
579+
test/data/
580+
retention-days: 1
571581

572582
- name: Use Node 20
573583
if: ${{ matrix.NODE_PACKAGE_TESTS_ONLY == 'ON' }}
@@ -628,8 +638,39 @@ jobs:
628638
ccache -p
629639
ccache -s
630640
641+
cucumber-tests:
642+
needs: build-matrix
643+
strategy:
644+
fail-fast: false
645+
matrix:
646+
build-config: [clang-18-release, gcc-14-release, conan-linux-release]
647+
algorithm: [ch, mld]
648+
load_method: [datastore, mmap, directly]
649+
name: cucumber-${{ matrix.build-config }}-${{ matrix.algorithm }}-${{ matrix.load_method }}
650+
runs-on: ubuntu-24.04
651+
steps:
652+
- uses: actions/checkout@v4
653+
- uses: actions/setup-node@v4
654+
with:
655+
node-version: 22
656+
- name: Enable Node.js cache
657+
uses: actions/cache@v4
658+
with:
659+
path: ~/.npm
660+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
661+
restore-keys: |
662+
${{ runner.os }}-node-
663+
- name: Download build artifacts
664+
uses: actions/download-artifact@v4
665+
with:
666+
name: cucumber-artifacts-${{ matrix.build-config }}
667+
- name: Install npm dependencies
668+
run: npm ci --ignore-scripts
669+
- name: Run cucumber tests
670+
run: OSRM_LOAD_METHOD=${{ matrix.load_method }} npx cucumber-js features/ -p ${{ matrix.algorithm }}
671+
631672
ci-complete:
632673
runs-on: ubuntu-latest
633-
needs: [build-matrix, conan-windows-release-node, docker-image-matrix]
674+
needs: [build-matrix, cucumber-tests, conan-windows-release-node, docker-image-matrix]
634675
steps:
635676
- run: echo "CI complete"

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Unreleased
22
- Changes from 6.0.0
33
- Build:
4+
- CHANGED: Parallelize cucumber tests using GitHub Actions matrix strategy [#7319](https://github.com/Project-OSRM/osrm-backend/pull/7319)
45
- FIXED: Update Node.js binding path from `lib/binding` to `lib/binding_napi_v8` to match node-pre-gyp versioning conventions [#7272](https://github.com/Project-OSRM/osrm-backend/pull/7272)
56
- FIXED: Reduce MSVC compiler warnings by suppressing informational warnings while preserving bug-indicating warnings [#7253](https://github.com/Project-OSRM/osrm-backend/issues/7253)
67
- Misc:

0 commit comments

Comments
 (0)