xue35 / TCX.jl

TCX parses TCX/XML sports file.
MIT License
1 stars 2 forks source link

Use TravisCI to auto build TCX project #2

Closed xue35 closed 5 years ago

xue35 commented 5 years ago

Choosing Julia versions to test against #

Julia workers on Travis CI download and install a binary of Julia. You can specify the Julia versions to test in the julia: key in your .travis.yml file. For example:

language: julia
julia:
  - nightly
  - 0.7
  - 0.6.4

Acceptable formats are:

nightly will test against the latest nightly build of Julia.
X.Y will test against the latest release for that minor version.
X.Y.Z will test against that exact version.

The oldest versions for which binaries are available is 0.3.1 for Linux, or 0.2.0 for macOS. Coverage #

Services such as codecov.io and coveralls.io provide summaries and analytics of the coverage of the test suite. After enabling the respective services for the repositories, the codecov and coveralls options can be used as follows, placing them at the top level of the YAML document:

codecov: true
coveralls: true

This will then upload the coverage statistics upon successful completion of the tests to the specified services. Default Build and Test Script #

If your repository contains JuliaProject.toml or Project.toml file, and you are building on Julia v0.7 or later, the default build script will be:

using Pkg
Pkg.build() # Pkg.build(; verbose = true) for Julia 1.1 and up
Pkg.test(coverage=true)

Otherwise it will use the older form:

if VERSION >= v"0.7.0-DEV.5183"
    using Pkg
end
Pkg.clone(pwd())
Pkg.build("$pkgname") # Pkg.build("$pkgname"; verbose = true) for Julia 1.1 and up
Pkg.test("$pkgname", coverage=true)

where the package name $pkgname is the repository name, with any trailing .jl removed.

Note that the coverage=true argument only tells Pkg.test to emit coverage information about the tests it ran; it does not submit this information to any services. To submit coverage information, see the coverage section above. Dependency Management #

If your Julia package has a deps/build.jl file, then Pkg.build("$name") will run that file to install any dependencies of the package. If you need to manually install any dependencies that are not handled by deps/build.jl, it is possible to specify a custom dependency installation command as described in the general build configuration guide. Build Matrix #

For Julia projects, env and julia can be given as arrays to construct a build matrix. Environment Variable #

The version of Julia a job is using is available as:

TRAVIS_JULIA_VERSION

In addition, JULIA_PROJECT is set to @., which means Julia will search through parent directories until a Project.toml or JuliaProject.toml file is found; the containing directory then is used the home project/environment.

Add TravisCI build status badge to project README.md

[![Build Status](https://travis-ci.com/username/projectname.svg?branch=master)](https://travis-ci.com/username/projectname)

URL: https://docs.travis-ci.com/user/languages/julia/