Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
.gitlab-ci.yml 737 B
Newer Older
Karine Bauch's avatar
Karine Bauch committed
include:
    -   remote: 'https://gitlab.com/r2devops/hub/-/raw/template_release@0.5.2/jobs/template_release/template_release.yml'
Karine Bauch's avatar
Karine Bauch committed
    -   project: 'beebryte/cicd/pytest'
        ref: '$CI_COMMIT_BRANCH$CI_COMMIT_TAG'
Karine Bauch's avatar
Karine Bauch committed

pytest:
    variables:
        PROJECT_PATH: "tests/passing_test"

Karine Bauch's avatar
Karine Bauch committed
pytest_fail:
Karine Bauch's avatar
Karine Bauch committed
    extends: pytest
Karine Bauch's avatar
Karine Bauch committed
    variables:
Karine Bauch's avatar
Karine Bauch committed
        PROJECT_PATH: "tests/failing_test"
    script:
        - >
            pytest tests/failing_test > /dev/null 2>&1 || EXIT_CODE=$?;
            if [ $EXIT_CODE -eq 1 ]; then
                echo "Pytest found failing test as it should"
            else
                echo "Pytest did not find failing test as it should"
                exit 1
            fi