diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eeeb220..ba50f89 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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}