Skip to content

Commit

Permalink
Test the high level modules of vibe-d as part of CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Feb 17, 2024
1 parent a6a55b6 commit 43cb3a3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ 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
Expand All @@ -42,7 +42,7 @@ jobs:
uses: dlang-community/setup-dlang@v1
with:
compiler: ${{ matrix.dc }}
dub: 1.29.0
dub: 1.30.0

- name: '[POSIX] Run tests'
env:
Expand Down
23 changes: 17 additions & 6 deletions run-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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

0 comments on commit 43cb3a3

Please sign in to comment.