From 688a221bec66a763b2b54885045394e9e9966ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Sat, 17 Feb 2024 18:18:49 +0100 Subject: [PATCH] Test the high level modules of vibe-d as part of CI. --- .github/workflows/ci.yml | 10 ++++------ run-ci.sh | 23 +++++++++++++++++------ 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 12a3096..97a2630 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,20 +29,19 @@ jobs: include: # Custom part for coverage - { os: ubuntu-latest, dc: dmd-latest, parts: 'unittests,tests', extra_dflags: "-cov -version=VibedSetCoverageMerge" } - # Custom part for vibe-core 1.x.x testing - - { os: ubuntu-latest, dc: dmd-latest, parts: 'builds,unittests,tests', extra_dflags: '' } + # Custom part for vibe.d integration testing + - { os: ubuntu-latest, dc: dmd-latest, parts: 'vibe-d', extra_dflags: '' } runs-on: ${{ matrix.os }} timeout-minutes: 60 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Prepare compiler uses: dlang-community/setup-dlang@v1 with: compiler: ${{ matrix.dc }} - dub: 1.29.0 - name: '[POSIX] Run tests' env: @@ -83,13 +82,12 @@ jobs: timeout-minutes: 60 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Prepare compiler uses: dlang-community/setup-dlang@v1 with: compiler: ${{ matrix.dc }} - dub: 1.29.0 - name: '[POSIX] Run tests' env: diff --git a/run-ci.sh b/run-ci.sh index d475551..66bbac2 100755 --- a/run-ci.sh +++ b/run-ci.sh @@ -6,12 +6,6 @@ DUB_ARGS="--build-mode=${DUB_BUILD_MODE:-separate} ${DUB_ARGS:-}" # default to run all parts : ${PARTS:=lint,builds,unittests,examples,tests} -# force selecting vibe-core 2.x.x -if [[ $PARTS =~ (^|,)vibe-core-1(,|$) ]]; then - RECIPES=`find | grep dub.sdl` - sed -i "s/\"vibe-core\" version=\">=1\.0\.0 <3\.0\.0-0\"/\"vibe-core\" version=\">=1.0.0 <2.0.0-0\"/g" $RECIPES -fi - if [[ $PARTS =~ (^|,)lint(,|$) ]]; then ./scripts/test_version.sh # Check for trailing whitespace" @@ -60,3 +54,20 @@ if [[ $PARTS =~ (^|,)tests(,|$) ]]; then fi done fi + +if [[ $PARTS =~ (^|,)vibe-d(,|$) ]]; then + PATH_ESCAPED=$(echo `pwd` | sed 's_/_\\/_g') + SED_EXPR='s/"vibe-http": [^,]*(,?)/"vibe-http": \{"path": "'$PATH_ESCAPED'"\}\1/g' + + git clone https://github.com/vibe-d/vibe.d.git --depth 1 + cd vibe.d + dub upgrade -s + for i in `find | grep dub.selections.json`; do + sed -i -E "$SED_EXPR" $i + done + dub test :mongodb $DUB_ARGS + dub test :redis $DUB_ARGS + dub test :web $DUB_ARGS + cd .. +fi +