aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-06-20 17:05:37 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-06-20 17:05:37 -0700
commit0ecc8dd0c31412204fb1ac97e49504aa3ee77caa (patch)
treec3251491c7056abafda57d56a42ad7f97068648d
parentc762be87bddf01e1d0c85275fe357be49b979dae (diff)
downloadfatcat-0ecc8dd0c31412204fb1ac97e49504aa3ee77caa.tar.gz
fatcat-0ecc8dd0c31412204fb1ac97e49504aa3ee77caa.zip
try caching/globals in gitlab-ci
-rw-r--r--.gitlab-ci.yml30
1 files changed, 16 insertions, 14 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d8724581..f64e864c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,10 +1,21 @@
+cache:
+ key: "${CI_COMMIT_REF_SLUG}"
+ paths:
+ - python/.venv/
+ - rust/target/
+ - rust/.cargo_cache/
+
+variables:
+ LC_ALL: "C.UTF-8"
+ LANG: "C.UTF-8"
+ PIPENV_VENV_IN_PROJECT: "true"
+ CARGO_HOME: ".cargo_cache"
+
+image: "rust:1.32-stretch"
+
unified_test:
- image: "rust:1.32-stretch"
variables:
- LC_ALL: "C.UTF-8"
- LANG: "C.UTF-8"
- PIPENV_VENV_IN_PROJECT: "true"
POSTGRES_DB: "fatcat_test"
POSTGRES_USER: "fatcat_user"
POSTGRES_PASSWORD: "fatcat_pw"
@@ -13,9 +24,9 @@ unified_test:
services:
- "postgres:11"
before_script:
- - cargo install diesel_cli --version 1.3.1
- apt update -qy
- apt install -y python3-dev python3-pip python3-wheel python3-requests python3-six python3-pytest libsnappy-dev libsodium-dev
+ - cargo install diesel_cli --version 1.3.1
- pip3 install pipenv
- pipenv --version
script:
@@ -39,10 +50,6 @@ unified_test:
rust_build_release:
stage: build
when: manual
- image: "rust:1.32-stretch"
- variables:
- LC_ALL: "C.UTF-8"
- LANG: "C.UTF-8"
before_script:
- apt update -qy
- apt install -y python3-dev python3-pip python3-wheel python3-requests python3-six python3-pytest libsnappy-dev libsodium-dev
@@ -58,11 +65,6 @@ rust_build_release:
python_build_release:
stage: build
when: manual
- image: "rust:1.32-stretch"
- variables:
- LC_ALL: "C.UTF-8"
- LANG: "C.UTF-8"
- PIPENV_VENV_IN_PROJECT: "true"
before_script:
- apt update -qy
- apt install -y python3-dev python3-pip python3-wheel python3-requests python3-six python3-pytest libsnappy-dev libsodium-dev