AppVeyor is a Continuous Integration platform for GitHub projects. It runs its builds on Windows virtual machines.

AppVeyor can run the project’s tests automatically whenever new code is pushed to the repo. This ensures that existing functionality and features have not been broken on Windows by the changes.

The current AppVeyor setup performs the following things whenever someone pushes code to the repo:

  • Runs the gradlew.bat headless allTests command.

  • Automatically retries the build up to 3 times if a task fails.

If you would like to customize your AppVeyor build further, you can learn more about AppVeyor from the AppVeyor Documentation.

Setting up AppVeyor

  1. Fork the repo to your own organization.

  2. Go to https://ci.appveyor.com/, and under Login, click on GitHub to login with your GitHub account. Enter your GitHub account details if needed.

    Click on GitHub in the login page

  3. After logging in, you will be brought to your projects dashboard. Click on NEW PROJECT.

    Click on "NEW PROJECT" in the projects dashboard

  4. You will be brought to the Select repository page. Select GitHub.

    • On your first usage of AppVeyor, you will need to give AppVeyor authorization to your GitHub account. Click on Authorize GitHub.

      Click on Authorize GitHub

    • This will bring you to a GitHub page that manages the access of third-party applications to your repositories.

      Depending on whether you are the owner of the repository, you can either grant access:

      Grant Access

      Or request access:

      Request Access

  5. AppVeyor will then list the repositories you have access to in your GitHub account. Find the repository you want to set AppVeyor up on, and then click ADD.

    Click "Add" on the repository you want to set AppVeyor up on

  6. AppVeyor will then be activated on that repository. To see the CI in action, push a commit to any branch!

    • Go to the repository and see the pushed commit. There should be an icon which will link you to the AppVeyor build:

      Commit build

    • As the build is run on a remote machine, we can only examine the logs it produces:

      AppVeyor build

  7. Update the link to the "build status" badge at the top of README.adoc to point to the AppVeyor build status of your own repo.

    • To find your build status badge URL, first go to your project settings by clicking on the "Settings" icon:

      Click on project settings

    • Then go to the Badges section of your project settings by clicking on it:

      Click on "Badges"

    • As AppVeyor does not provide asciidoc code for the badge, we will have to create our own. Start by copying the markdown code provided:

      Copy the markdown code

      The markdown code should be in this format:

      [![Build status](<link to image>)](<link to project>)

      Convert it to the asciidoc format as follows:

      <link to project>[image:<link to image>[Build status]]

      The asciidoc code should look similar to:

      https://ci.appveyor.com/project/damithc/addressbook-level4[image:https://ci.appveyor.com/api/projects/status/3boko2x2vr5cc3w2?svg=true[Build status]]

      Copy and paste the asciidoc code to your README.adoc file.