Running azurite for tests in a GitHub action
See original GitHub issueWhich service(blob, file, queue, table) does this issue concern?
Blob
Which version of the Azurite was used?
3.7.0
Where do you get Azurite? (npm, DockerHub, NuGet, Visual Studio Code Extension)
npm
What’s the Node.js version?
11
What problem was encountered?
Running azurite in a GitHub action to allow tests to run
Steps to reproduce the issue?
I’m running the following in my action:
- name: Install NPM
uses: actions/setup-node@v1
with:
node-version: '12'
- run: npm install -g azurite
- shell: cmd
run: start /B azurite-blob
- name: Run tests
run: dotnet test ./src/ServiceBus.AttachmentPlugin.sln --configuration Release --no-restore --verbosity normal
Can see azurite is running, but tests are failing to connect.
Tests execution:
Is this a correct way to run azurite when using GitHub actions? The workflow I’m using fails to execute tests that are connecting to the development storage account.
Issue Analytics
- State:
- Created 3 years ago
- Comments:15
Top Results From Across the Web
Running Azurite Azure Storage Emulator in GitHub Actions
To run some tests on the CI pipeline I'm using the new Azurite tool, a cross-plattfrom Storage Account emulator that is perfect for...
Read more >Using Azurite to Run Blob Storage Tests in a Pipeline
Install and run Azurite for local tests: · In Azure Storage Explorer, select Attach to a local emulator · Provide a Display name...
Read more >How to run Azure Storage unit tests in CI - Today I Learned
The first line will install it, and the second will start it in a background process. Tests will need to use CloudStorageAccount.
Read more >How to make integration test for Azure Storage in C# – Part 3
When pushing code to GitHub and testing it via GitHub actions, ... and call it AzuriteContainer.cs that will consume azurite docker via C#....
Read more >How to integration test Azure Blob Storage? - Stack Overflow
Ensure that Azurite is up and running on the docker desktop. ... pull and fire up Azurite for testing locally and in GitHub...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No apology needed - I’m not sure of the precise mechanics around
start /B
behavior or background processes in Windows. And I think that you’re right, this does actually appear to be a somewhat different concept.The docs say:
It sounds like this doesn’t really put something in the background - at least in the Unix sense - as much as it means that the new process just has the I/O of the existing window, and that this is tied to the current console:
Changing this to bash and putting it in the background with
&
seems to get the process running correctly.The best place to get help is github.community - support, engineering and product members of the Actions team hang out there.
FYI there’s an even simpler solution available now, by running Azurite in a Docker container as part of your job. Just add the following under your job, above steps:
This follows the same approach recommended for Redis here: https://docs.github.com/en/actions/using-containerized-services/creating-redis-service-containers