Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dumux-repositories
dumux
Commits
893a1421
Commit
893a1421
authored
3 years ago
by
Dennis Gläser
Browse files
Options
Downloads
Plain Diff
Merge branch 'feature/ci-python-select-tests' into 'master'
[ci] Add test selection for Python tests Closes
#1063
See merge request
!2802
parents
7fa86e86
a9389edc
No related branches found
No related tags found
1 merge request
!2802
[ci] Add test selection for Python tests
Pipeline
#7870
passed
3 years ago
Stage: check-status
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci/default.yml
+17
-3
17 additions, 3 deletions
.gitlab-ci/default.yml
with
17 additions
and
3 deletions
.gitlab-ci/default.yml
+
17
−
3
View file @
893a1421
...
@@ -81,10 +81,12 @@ select tests:
...
@@ -81,10 +81,12 @@ select tests:
echo "No reference information given."
echo "No reference information given."
echo "Skipping test selection, build/test stages will consider all tests!"
echo "Skipping test selection, build/test stages will consider all tests!"
touch affectedtests.json
touch affectedtests.json
touch changedfiles.txt
fi
fi
artifacts
:
artifacts
:
paths
:
paths
:
-
affectedtests.json
-
affectedtests.json
-
changedfiles.txt
expire_in
:
3 hours
expire_in
:
3 hours
needs
:
needs
:
-
job
:
configure
-
job
:
configure
...
@@ -145,9 +147,21 @@ test python:
...
@@ -145,9 +147,21 @@ test python:
script
:
script
:
-
source bin/testing/ci-setup-python-env.sh
-
source bin/testing/ci-setup-python-env.sh
-
|
-
|
pushd build-cmake
if ([ ! -s changedfiles.txt ] || grep -q python "changedfiles.txt"); then
ctest --output-on-failure -L python
if [ ! -s changedfiles.txt ]; then
popd
echo "Skipping test selection: considering all Python tests."
else
echo "Detected changes in the Python bindings/Python code: considering all Python tests."
fi
source bin/testing/ci-setup-python-env.sh
pushd build-cmake
ctest --output-on-failure -L python
popd
else
echo "No changes in the Python bindings/Python code detected: skipping tests."
fi
needs
:
needs
:
-
job
:
configure
-
job
:
configure
artifacts
:
true
artifacts
:
true
-
job
:
select tests
artifacts
:
true
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment