I moved my stuff to github actions using https://github.com/asottile/workflows
First configure a github service connection
It is suggested to use a generic name, such as github
so forks can also
configure the same.
You can find this in Project Settings
=> Service connections
in the
Azure Devops dashboard for your project. Project settings is located in the
bottom left corner of the UI as of 2019-03-07.
Below I'm using the endpoint name github
Next add this to the beginning of your azure-pipelines.yml
resources:
repositories:
- repository: asottile
type: github
endpoint: github
name: asottile/azure-pipeline-templates
ref: refs/tags/v2.5.2
this will make the templates in this repository available in the asottile
namespace.
new in v0.0.1
This job template will install python and invoke tox.
toxenvs
: the list oftox
environment names to runos
: choices (linux
,windows
,osx
)architectures
: new in v2.0.0 list with choices (x64
,x86
), default[x64]
(only affects windows)coverage
: new in v0.0.7 after the run publish coverage to azure pipelines, defaulttrue
wheel_tags
: new in v0.0.10 after a run of a tag, build a wheel and publish it as an artifact, defaultfalse
. the artifacts can be downloaded using thebin/download-wheels
script included in this repository.additional_variables
: new in v0.0.13 additional pipelinevariables
pre_test
: new in v0.0.5steps
to run before runningtox
, such as installing tools, etc. default:[]
name_postfix
: new in v0.0.5 string to be appended to job name if you need to make it unique, default:''
The tox environments must either:
- be equal to:
py37
,py38
,py39
,py310
,py311
,py312
,pypy3
- start with:
py37-
,py38-
,py39-
,py310-
,py311-
,py312-
,pypy3-
for now, python3.12 is only available on linux -- it is installed from deadsnakes
coverage information can be displayed using a shields.io badge
- template: job--python-tox.yml@asottile
parameters:
toxenvs: [py27, py37]
os: windows
new in v0.0.2
This job template will invoke pre-commit against all files.
ruby
: the version of ruby to install to the system (used by some hooks), defaults to'>= 2.4'
python
: the python version to run pre-commit with, defaults to'3.7'
- template: job--pre-commit.yml@asottile
new in v0.0.6
This job checks out a go project, runs go get
and then go test
go_versions
: list of go versions to test againstos
: choices (linux
,windows
,macos
)tests
: what togo test ...
, default./...
pre_test
:steps
to run before runningtox
, such as installing tools, etc. default:[]
name_postfix
: string to be appended to job name if you need to make it unique, default:''
- template: job--go-test.yml@asottile
parameters:
go_versions: ['1.11.5', '1.12']
os: 'linux'
When referring to a step template as part of pre_test
, omit the @asottile
repository selector (as the template is included after job templating).
new in v0.0.8
This step template will install git
from source and put it on the PATH
.
This step is currently only supported on linux
.
versions
: ref to install at, defaultHEAD
- template: step--install-git.yml