-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
18 lines (17 loc) · 845 Bytes
/
.gitlab-ci.yml
File metadata and controls
18 lines (17 loc) · 845 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# This file contains GitLab configurations for the project.
default:
image: python:3.10
testing:
stage: test
script:
- pip install .[examples] # Install sim-procesd package
- python -m unittest # Run unittests
- | # Run examples with 'testing' flag:
for f in examples/*.py # List all example. f=examples/Test.py
do h="${f##*/}" # Remove last / and everything before. h=Test.py
if [[ $h = [A-Z]* ]] # Check if name starts with a capital letter.
# Run example with 'testing' flag. If test exits with non-zero value then raise an error.
then echo python $f testing
python $f testing || exit 1
fi
done