adding build caching and delaying tests as cargo is slow to start up sometimes
This commit is contained in:
parent
776ceb83c9
commit
bae3e02b48
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user