CI/CD pipelines #537
-
How does this work with Azure DevOps pipelines or GitHub actions? Does it "just work" or is this library only useful in a local developer environment? Any Azure DevOps and GitHub Actions yml examples would be awesome. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Testcontainers runs on CI / CD too. All tests in this library run on GitHub Actions and previous on Azure DevOps Pipelines. I've used it on Jenkins, GitLab and Bitbucket Pipelines too. |
Beta Was this translation helpful? Give feedback.
-
How can I use a private Azure container registry in Azure DevOps pipeline? I'm getting the following error:
I have the following task in Azure DevOps pipeline: - task: AzureCLI@2
displayName: Test
inputs:
azureSubscription: <my service connection with AcrPull role>
scriptType: pscore
scriptLocation: inlineScript
inlineScript: |
az acr login --name <my registry>
dotnet test <my solution>.sln --no-build --configuration Release The tests work locally as my user has access to the Azure container registry |
Beta Was this translation helpful? Give feedback.
-
I'm have a similar issue in GitHub Actions when trying to access the GitHub Container Repo. name: 'Run Tests'
on:
workflow_call:
inputs:
CSPROJ_PATH:
required: true
type: string
permissions:
packages: read
contents: read
jobs:
tests:
runs-on: ubuntu-latest
timeout-minutes: 45
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
steps:
- name: 'Checkout code'
uses: actions/checkout@v4
- name: 'Use .NET'
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: 'Run Tests'
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 2
retry_wait_seconds: 30
command: dotnet test ${{ inputs.CSPROJ_PATH }} However when our tests run we still get these errors:
|
Beta Was this translation helpful? Give feedback.
Testcontainers runs on CI / CD too. All tests in this library run on GitHub Actions and previous on Azure DevOps Pipelines. I've used it on Jenkins, GitLab and Bitbucket Pipelines too.