Anyone ever had to sign in to the az cli (service principal) or something else to get the tests running?
The current image doesn't have az cli, I was wondering if anyone had the same issue, if one just installs the az cli on the container for every build or if there's some other better way to do it!
Should I just go through https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?pivots=apt and install it on every run?
Thanks in advance.
This thread is trying to answer question "How to install the Azure CLI on a Playwright CI container for every build?"
I did what @mxschmitt suggested. Works fine. It's not "quite fast"... but this is a side project, doesn't hurt.
- Install Az Client 3m 12s
- Login to Azure 4s
- Run Tests 1m 51s
[...]
jobs:
build:
name: 'Build'
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright/dotnet:v1.32.0-jammy
steps:
- uses: actions/checkout@v3
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- run: dotnet build
- name: Install Az Client
run: curl -sL https://aka.ms/InstallAzureCLIDeb | bash
- name: Login to Azure
run: az login --service-principal --username ${{ secrets.servicePrincipalId }} --password ${{ secrets.servicePrincipalKey }} --tenant ${{ secrets.tenantId }}
- name: Run Tests
run: dotnet test
[...]
But works, if people are facing a similar issue and while they work on other solutions... at least, unblocks the pipeline.
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].