Skip to content
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

Test the high level modules of vibe-d as part of CI #28

Merged
merged 1 commit into from
Feb 17, 2024
Merged
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
10 changes: 4 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
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

Loading