This document explains how to set up the CI environment to run integration tests with Azure DevOps.
To run integration tests in the CI environment, you need to configure the following GitHub Secrets:
- AZURE_DEVOPS_ORG_URL: The URL of your Azure DevOps organization (e.g.,
https://dev.azure.com/your-organization
) - AZURE_DEVOPS_PAT: A Personal Access Token with appropriate permissions
- AZURE_DEVOPS_DEFAULT_PROJECT (optional): The default project to use for tests
- Go to your GitHub repository
- Click on "Settings" > "Secrets and variables" > "Actions"
- Click on "New repository secret"
- Add each of the required secrets:
- Name:
AZURE_DEVOPS_ORG_URL
- Value:
https://dev.azure.com/your-organization
- Name:
AZURE_DEVOPS_PAT
- Value: Your Personal Access Token
- Name:
AZURE_DEVOPS_DEFAULT_PROJECT
- Value: Your project name
The PAT used for integration tests should have the following permissions:
- Code: Read & Write
- Work Items: Read & Write
- Build: Read & Execute
- Project and Team: Read
- Graph: Read
- Release: Read & Execute
- Use a dedicated Azure DevOps organization or project for testing
- Create a PAT with the minimum required permissions
- Consider setting an expiration date for the PAT
- Regularly rotate the PAT used in GitHub Secrets
If integration tests fail in CI:
- Check the GitHub Actions logs for detailed error messages
- Verify that the PAT has not expired
- Ensure the PAT has the required permissions
- Confirm that the organization URL is correct
- Check if the default project exists and is accessible with the provided PAT