* Changing target docker to pipeline docker image
* Increasing expries_in flags to be 30 minutes from 15 + Adding build-keys job which builds hmac keys + build-rtc-server: simple build job * Moving cargo-test-json-api (unit tests) to the bottom with the other tests ! full-mock-tests are now implemented so its time to watch them fail horribly
This commit is contained in:
parent
f6e6c59837
commit
1805023afd
123
.gitlab-ci.yml
123
.gitlab-ci.yml
@ -1,4 +1,4 @@
|
|||||||
image: shockrah/freechat-pipeline:latest
|
image: shockrah/fc-pipeline:latest
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- documentation
|
- documentation
|
||||||
@ -27,12 +27,13 @@ before_script:
|
|||||||
|
|
||||||
|
|
||||||
build-json-api:
|
build-json-api:
|
||||||
# Literally so expensive that I realy just don't wanna deal with it
|
# This is easily the most expensive stage since cargo sucks so we try to cache
|
||||||
|
# everything we can between jobs here
|
||||||
stage: build
|
stage: build
|
||||||
|
|
||||||
only:
|
only:
|
||||||
refs:
|
refs:
|
||||||
- broken
|
- master
|
||||||
|
|
||||||
changes:
|
changes:
|
||||||
- json-api/Cargo.*
|
- json-api/Cargo.*
|
||||||
@ -60,43 +61,42 @@ build-json-api:
|
|||||||
- json-api/target/
|
- json-api/target/
|
||||||
- $CARGO_HOME
|
- $CARGO_HOME
|
||||||
|
|
||||||
expire_in: 15 mins
|
expire_in: 30 mins
|
||||||
|
|
||||||
|
|
||||||
test-json-api:
|
build-keys:
|
||||||
stage: test
|
stage: build
|
||||||
needs:
|
|
||||||
- build-json-api
|
|
||||||
only:
|
only:
|
||||||
refs:
|
refs:
|
||||||
- broken
|
- master
|
||||||
|
|
||||||
changes:
|
|
||||||
- json-api/Cargo.*
|
|
||||||
- json-api/src/*
|
|
||||||
- json-api/src/testing/*
|
|
||||||
|
|
||||||
- json-api/migrations/**/*
|
|
||||||
|
|
||||||
- json-api/client-tests/**/*
|
|
||||||
|
|
||||||
- json-api/build.sh
|
|
||||||
|
|
||||||
- json-api/db/Cargo.*
|
|
||||||
- json-api/db/src/*
|
|
||||||
|
|
||||||
dependencies:
|
|
||||||
- build-json-api
|
|
||||||
|
|
||||||
|
# Here we generate some hmac keys for testing before we go on to testing
|
||||||
script:
|
script:
|
||||||
- cd json-api/
|
- head --bytes=32 /dev/urandom > hmac.secret
|
||||||
- cargo test --release
|
- head --bytes=32 /dev/urandom > wss-hmac.secret
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- json-api/target/release/json-api
|
- hmac.secret
|
||||||
expire_in: 1 week
|
- wss-hmac.secret
|
||||||
name: json-api
|
|
||||||
|
|
||||||
|
build-rtc-server:
|
||||||
|
stage: build
|
||||||
|
only:
|
||||||
|
refs:
|
||||||
|
- master
|
||||||
|
|
||||||
|
script:
|
||||||
|
- cd rtc-server/
|
||||||
|
- npm build
|
||||||
|
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- rtc-server/node_modules/
|
||||||
|
expire_in: 30 mins
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
build-channer:
|
build-channer:
|
||||||
stage: build
|
stage: build
|
||||||
@ -123,7 +123,6 @@ build-channer:
|
|||||||
|
|
||||||
build-wiki:
|
build-wiki:
|
||||||
image: shockrah/website:latest
|
image: shockrah/website:latest
|
||||||
only: [ "master" ]
|
|
||||||
stage: documentation
|
stage: documentation
|
||||||
|
|
||||||
only:
|
only:
|
||||||
@ -148,3 +147,61 @@ build-wiki:
|
|||||||
- ssh $SHOPTS web@shockrah.xyz "rm -rf /var/www/freechat"
|
- ssh $SHOPTS web@shockrah.xyz "rm -rf /var/www/freechat"
|
||||||
- scp $SHOPTS -r public/ web@shockrah.xyz:/var/www/freechat
|
- scp $SHOPTS -r public/ web@shockrah.xyz:/var/www/freechat
|
||||||
|
|
||||||
|
|
||||||
|
# Test routines past this point
|
||||||
|
cargo-test-json-api:
|
||||||
|
# Basic cargo unit tests(that honestly are nearly useless)
|
||||||
|
stage: test
|
||||||
|
needs:
|
||||||
|
- build-json-api
|
||||||
|
only:
|
||||||
|
refs:
|
||||||
|
- master
|
||||||
|
|
||||||
|
changes:
|
||||||
|
- json-api/Cargo.*
|
||||||
|
- json-api/src/*
|
||||||
|
- json-api/src/testing/*
|
||||||
|
|
||||||
|
- json-api/migrations/**/*
|
||||||
|
|
||||||
|
- json-api/client-tests/**/*
|
||||||
|
|
||||||
|
- json-api/build.sh
|
||||||
|
|
||||||
|
- json-api/db/Cargo.*
|
||||||
|
- json-api/db/src/*
|
||||||
|
|
||||||
|
dependencies:
|
||||||
|
- build-json-api
|
||||||
|
|
||||||
|
script:
|
||||||
|
- cd json-api/
|
||||||
|
- export HMAC_PATH="../hmac.secret" && \
|
||||||
|
export WSS_HMAC_PATH="../wss-hmac.secret" && \
|
||||||
|
cargo test --release
|
||||||
|
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- json-api/target/release/json-api
|
||||||
|
expire_in: 1 week
|
||||||
|
name: json-api
|
||||||
|
|
||||||
|
full-mock-tests:
|
||||||
|
stage: test
|
||||||
|
needs:
|
||||||
|
- build-json-api
|
||||||
|
- build-rtc-server
|
||||||
|
- build-keys
|
||||||
|
only:
|
||||||
|
refs:
|
||||||
|
- master
|
||||||
|
dependencies:
|
||||||
|
- build-json-api
|
||||||
|
- build-rtc-server
|
||||||
|
- build-keys
|
||||||
|
|
||||||
|
script:
|
||||||
|
- bash scripts/build-db.sh
|
||||||
|
- bash scripts/run-api-tests.sh
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user