I would like to make e2e tests on two component in my application. To do it I need to start the two servers before running my tests. So I would like to run
background step in which I would like to start my two server at the same time but it’s not working. I have only one server started but not the other and I don’t know why.
- run: name: Expose services command: | npm start # front go run main.go # api background: true
Can someone help me to understand why I can’t start my two server ? I also tried to put this two command into a
#!/bin/bash echo "Starting services..." npm start & echo "Web app expose to 8000" go run main.go & echo "Web app expose to 8001"
with the following config but it’s also not working.
- run: name: Expose services command: ./expose.sh background: true
I also tried to add
& at the end of each command to run my command in background but it’s not working.
- run: name: Expose services command: | npm start & go run main.go & background: true
I know that I can put each command in different steps but I would like to know if it’s possible to refactor it into one step ?
Thanks you very much.