Proper build caching and updating needs field for testing stage
This commit is contained in:
parent
baae2caaf0
commit
e4c6c46061
@ -1,32 +1,33 @@
|
|||||||
image: shockrah/freechat:0.3
|
image: shockrah/freechat:0.3
|
||||||
|
variables:
|
||||||
|
CARGO_HOME: $CI_PROJECT_DIR/.cargo
|
||||||
|
|
||||||
build-release:
|
build-release:
|
||||||
stage: build
|
stage: build
|
||||||
only:
|
only:
|
||||||
- testing
|
- testing
|
||||||
cache:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
- target/
|
- target/
|
||||||
- $CI_HOME_DIR/.cargo/
|
|
||||||
|
|
||||||
script:
|
before_script:
|
||||||
- CARGO_HOME=$CI_PROJECT_DIR/.cargo
|
- cd server/
|
||||||
- cd server/
|
script:
|
||||||
- cargo build
|
- cargo build
|
||||||
- diesel setup --database-url $DATABASE_URL
|
- diesel setup --database-url $DATABASE_URL
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
basic-test:
|
api-test:
|
||||||
stage: test
|
stage: test
|
||||||
needs: ["build-release"]
|
needs: ["build-release"]
|
||||||
only:
|
only:
|
||||||
- testing
|
- testing
|
||||||
script:
|
script:
|
||||||
- cd server/
|
- cd server/
|
||||||
- cargo run -- -s
|
- cargo run -- -s > server.log&
|
||||||
- fc_id=$!
|
- export fc_id=$!
|
||||||
- cd tests/
|
- cd tests/
|
||||||
- bash ./main.sh body
|
- bash ./main.sh body
|
||||||
- kill ${fc_id}
|
- kill ${fc_id}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user