adding build caching and delaying tests as cargo is slow to start up sometimes

This commit is contained in:
shockrah 2020-08-09 23:28:04 -07:00
parent 776ceb83c9
commit bae3e02b48

View File

@ -1,10 +1,16 @@
image: shockrah/freechat:0.3
debug-build:
build-release:
stage: build
only:
- testing
cache:
paths:
- target/
- $CI_HOME_DIR/.cargo/
script:
- CARGO_HOME=$CI_PROJECT_DIR/.cargo
- cd server/
- cargo build
- diesel setup --database-url $DATABASE_URL
@ -13,12 +19,15 @@ debug-build:
basic-test:
stage: test
needs: "build-release"
only:
- testing
script:
- cd server/
- cargo run -- -s&
- fc_id=$!
- echo Sleeping to let cargo catch up
- sleep 3
- cd tests/
- bash ./main.sh body
- kill ${fc_id}