diff --git a/jobs/swh-build.yaml b/jobs/swh-build.yaml new file mode 100644 index 0000000..4d8d87c --- /dev/null +++ b/jobs/swh-build.yaml @@ -0,0 +1,30 @@ +- job-template: + name: swh-build-{name} + node: swh-tox + + parameters: + - string: + name: BRANCH + default: '{branch|master}' + scm: + - git: + refspec: 'refs/heads/{branch|master}' + url: https://forge.softwareheritage.org/source/swh-{name}.git + + numToKeep: 20 + + triggers: + - pollscm: + cron: "0 */3 0 0 0" + + wrappers: + - timestamps + + builders: + - shell: python3 setup.py sdist bdist_wheel + + publishers: + - archive: + artifacts: "dist/*" + allow-empty: "true" + fingerprint: "true" diff --git a/jobs/swh-metrics.yaml b/jobs/swh-metrics.yaml new file mode 100644 index 0000000..329dcb3 --- /dev/null +++ b/jobs/swh-metrics.yaml @@ -0,0 +1,29 @@ +- job-template: + name: swh-metrics-{name} + node: swh-tox + + parameters: + - string: + name: BRANCH + default: '{branch|master}' + scm: + - git: + refspec: 'refs/heads/{branch|master}' + url: https://forge.softwareheritage.org/source/swh-{name}.git + + numToKeep: 20 + + triggers: + - pollscm: + cron: "0 */3 0 0 0" + + wrappers: + - timestamps + + builders: + - shell: mkdir -p reports + - shell: python3 -m tox -e flake8 + + - shell: python3 -m radon raw --json swh/ > reports/radon_raw.json + - shell: python3 -m radon cc --json swh/ > reports/radon_cc.json + - shell: python3 -m radon mi --json swh/ > reports/radon_mi.json diff --git a/jobs/swh-tests.yaml b/jobs/swh-tests.yaml new file mode 100644 index 0000000..72c86c9 --- /dev/null +++ b/jobs/swh-tests.yaml @@ -0,0 +1,47 @@ +- job-template: + name: swh-tests-{name} + node: swh-tox + + parameters: + - string: + name: BRANCH + default: '{branch|master}' + scm: + - git: + refspec: 'refs/heads/{branch|master}' + url: https://forge.softwareheritage.org/source/swh-{name}.git + + numToKeep: 20 + + triggers: + - pollscm: + cron: "0 */3 0 0 0" + + wrappers: + - timestamps + + builders: + - shell: mkdir -p reports + - shell: python3 -m tox -e py3 -- --with-coverage --cover-xml --cover-xml-file=./reports/covergage.xml --cover-package=swh.{name} --with-xunit --xunit-file=./reports/test-results.xml + - shell: python3 -m coverage xml -o ./reports/coverage.xml + + publishers: + - junit: + results: "reports/test-results.xml" + - cobertura: + report-file: "reports/coverage.xml" + fail-no-reports: "false" + fail-unhealthy: "false" + fail-unstable: "false" + only-stable: "false" + source-encoding: "UTF_8" + zoom-coverage-chart: "false" + targets: + - files: + healthy: 10 + unhealthy: 20 + failing: 30 + - method: + healthy: 50 + unhealthy: 40 + failing: 30 diff --git a/jobs/swh/core.yaml b/jobs/swh/core.yaml new file mode 100644 index 0000000..2137ac6 --- /dev/null +++ b/jobs/swh/core.yaml @@ -0,0 +1,6 @@ +- project: + name: core + jobs: + - swh-tests-{name} + - swh-metrics-{name} + - swh-build-{name}