diff --git a/jobs/swh-environment.yaml b/jobs/swh-environment.yaml index dc61e64..08c00d3 100644 --- a/jobs/swh-environment.yaml +++ b/jobs/swh-environment.yaml @@ -1,77 +1,77 @@ - project: name: DENV display-name: swh-environment jobs: - "{name}" - job: name: DENV/tests description: Run tests for each swh module in development version node: swh-sphinx triggers: - timed: "H */6 * * *" scm: - git: url: https://forge.softwareheritage.org/source/swh-environment.git branches: - "*/master" wrappers: - timeout: - timeout: 45 + timeout: 90 abort: true - timestamps builders: - shell: | #!/bin/bash # fetch swh repositories mr -j 4 -t update # setup a virtualenv python3 -m venv .venv . .venv/bin/activate # upgrade pip or some swh modules might end up being installed # in non editable mode pip install --upgrade pip # install dependencies pip install wheel pytest # temporary workaround to avoid new pip resolver to enter in a really # long package backtracking process leading to build job timeout # (https://github.com/pypa/pip/issues/9187) # pip install $(bin/pip-swh-packages --with-testing) while IFS= read -r package; do pip install $package done <<< $(./bin/pip-swh-packages --with-testing) cd swh-graph make java >/dev/null cd .. # execute tests in each swh module exit_code=0 for module in $(./bin/ls-py-modules) do cd $module tests_dir=$(echo $module | sed 's/-/\//g')/tests if [ -d "$tests_dir" ] then # pipe tests output to stdout and log file make test 2>&1 | tee ../$module.log tests_status=${PIPESTATUS[0]} # remove log file if tests succeeded if [[ "$tests_status" == "0" ]] then rm -f ../$module.log fi # script must be exited with error when a test suite failed exit_code=$(( tests_status > exit_code ? tests_status : exit_code )) fi cd .. done exit $exit_code publishers: - archive: artifacts: "*.log" allow-empty: true