diff --git a/src/doc/src/guide/continuous-integration.md b/src/doc/src/guide/continuous-integration.md index 25d2e385154..e98d9e86f9d 100644 --- a/src/doc/src/guide/continuous-integration.md +++ b/src/doc/src/guide/continuous-integration.md @@ -49,6 +49,40 @@ breakage in nightly will not fail your overall build. Please see the [GitLab CI](https://docs.gitlab.com/ce/ci/yaml/README.html) for more information. +### GitHub Actions + +To test your package on GitHub Actions, here is a sample `workflow.yml` file, which has to be in the directory `.github/workflows`: +```yaml +name: Rust + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Cache cargo registry + uses: actions/cache@v1 + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + - name: Cache cargo build + uses: actions/cache@v1 + with: + path: target + key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} + + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose +``` +This will run on a push to the repository. Pleas see the [GitHub Actions help](https://help.github.com/en/actions) for more information. + ### builds.sr.ht To test your package on sr.ht, here is a sample `.build.yml` file. diff --git a/src/doc/src/reference/manifest.md b/src/doc/src/reference/manifest.md index 25c6d6819c5..b9549687553 100644 --- a/src/doc/src/reference/manifest.md +++ b/src/doc/src/reference/manifest.md @@ -433,59 +433,11 @@ default-run = "a" ### The `[badges]` section -[crates.io] can display various badges for build status, test coverage, etc. for -each crate. All badges are optional. - -- The badges pertaining to build status that are currently available are - Appveyor, CircleCI, Cirrus CI, GitLab, Azure DevOps, Travis CI and Bitbucket - Pipelines. -- Available badges pertaining to code test coverage are Codecov and Coveralls. -- There are also maintenance-related badges based on isitmaintained.com - which state the issue resolution time, percent of open issues, and future - maintenance intentions. - -Most badge specifications require a `repository` key. It is expected to be in -`user/repo` format. +[crates.io] does not display various badges for build status, test coverage, etc. for +each crate any more. Only the following fields will be shown. ```toml [badges] - -# Appveyor: `repository` is required. `branch` is optional; default is `master` -# `service` is optional; valid values are `github` (default), `bitbucket`, and -# `gitlab`; `id` is optional; you can specify the appveyor project id if you -# want to use that instead. `project_name` is optional; use when the repository -# name differs from the appveyor project name. -appveyor = { repository = "...", branch = "master", service = "github" } - -# Circle CI: `repository` is required. `branch` is optional; default is `master` -circle-ci = { repository = "...", branch = "master" } - -# Cirrus CI: `repository` is required. `branch` is optional; default is `master` -cirrus-ci = { repository = "...", branch = "master" } - -# GitLab: `repository` is required. `branch` is optional; default is `master` -gitlab = { repository = "...", branch = "master" } - -# Azure DevOps: `project` is required. `pipeline` is required. `build` is optional; default is `1` -# Note: project = `organization/project`, pipeline = `name_of_pipeline`, build = `definitionId` -azure-devops = { project = "...", pipeline = "...", build="2" } - -# Travis CI: `repository` in format "/" is required. -# `branch` is optional; default is `master` -travis-ci = { repository = "...", branch = "master" } - -# Bitbucket Pipelines: `repository` is required. `branch` is required -bitbucket-pipelines = { repository = "...", branch = "master" } - -# Codecov: `repository` is required. `branch` is optional; default is `master` -# `service` is optional; valid values are `github` (default), `bitbucket`, and -# `gitlab`. -codecov = { repository = "...", branch = "master", service = "github" } - -# Coveralls: `repository` is required. `branch` is optional; default is `master` -# `service` is optional; valid values are `github` (default) and `bitbucket`. -coveralls = { repository = "...", branch = "master", service = "github" } - # Is it maintained resolution time: `repository` is required. is-it-maintained-issue-resolution = { repository = "..." }