Skip to content
Snippets Groups Projects
Commit 72271bb2 authored by Klaus Reuter's avatar Klaus Reuter
Browse files

retry educational example

parent d4484589
No related branches found
No related tags found
No related merge requests found
Pipeline #138134 failed
stages: # List of stages for jobs, and their order of execution
- build
- test
- deploy
cache: &global_cache
# key: $CI_COMMIT_REF_SLUG
key: $CI_COMMIT_SHA
paths:
- bin
policy: pull-push
build-job: # This job runs in the build stage, which runs first.
stage: build
tags:
- cloud
script:
- echo "Compiling the code..."
- echo "Compile complete."
- mkdir -p bin
- cp /usr/bin/rev bin
unit-test-job: # This job runs in the test stage.
stage: test # It only starts when the job in the build stage completes successfully.
tags:
- cloud-gpu
cache:
# inherit all global cache settings
<<: *global_cache
# override the policy
policy: pull
script:
- echo "Running unit tests... This will take about 60 seconds." | bin/rev
lint-test-job: # This job also runs in the test stage.
stage: test # It can run at the same time as unit-test-job (in parallel).
tags:
- cloud
cache:
# inherit all global cache settings
<<: *global_cache
# override the policy
policy: pull
script:
- echo "Linting code... This will take about 10 seconds." | bin/rev
deploy-job: # This job runs in the deploy stage.
stage: deploy # It only runs when *both* jobs in the test stage complete successfully.
tags:
- cloud
cache:
# inherit all global cache settings
<<: *global_cache
# override the policy
policy: pull
script:
- echo "Deploying application..."
- echo "Application successfully deployed." | bin/rev
test_python_numpy:
image: python:3.9
tags: - docker
cache:
key: "python39_pip_cache_20220731"
paths:
- .cache/pip
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
before_script:
- pip install numpy==1.22.4
script:
- >
python -c
"
import numpy as np
A = np.random.rand(32,32)
B = np.linalg.inv(A)
C = A @ B
assert(np.allclose(C.diagonal(), np.ones(32)))
"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment