Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicated execution of a command #421

Open
Janbk opened this issue Apr 25, 2023 · 3 comments
Open

Duplicated execution of a command #421

Janbk opened this issue Apr 25, 2023 · 3 comments

Comments

@Janbk
Copy link

Janbk commented Apr 25, 2023

Description: concurrently executes the first of two command twice
Expected Behavior:Both commands are executed
Environment:

  • Gitlab Runner / CI
  • Using Docker executor with image mcr.microsoft.com/playwright:v1.32.1-focal
  • corepack prepare [email protected] --activate
    Reproduction: Locally (in a Docker container) not reproducible

Hi,
I am using concurrently as it is described by Storybook to run a test runner against a locally running web-server. The web server is started with pnpm dlx http-server.... The test runner is at first waiting for the web server with pnpm dlx wait-on --timeout 300000 tcp:6006 && pnpm test-storybook ....

Concurrently starts two web server.

See the full log of the ci runner:
ci-runner.log

Can anyone see what is wrong here or what application behaves unexpected and how to make it work?

Thank you very much for the support
Kind regards
Jan

@paescuj
Copy link
Collaborator

paescuj commented Apr 25, 2023

Can you share the whole config?

@Janbk
Copy link
Author

Janbk commented Apr 25, 2023

Yes, but what is configured? concurrently is called in Gitlab CI script inside a docker container.
Any idea what else is configured? Perhaps that is part of my blind spot where something is wrong but I did not take it into account.

The .gitlab-ci.yml is this:

stages:
    - test

test-storybook:
    before_script:
    - echo "Configure PNPM"
    - corepack enable
    - corepack prepare pnpm@latest-8 --activate
    - pnpm config set store-dir /cache/.pnpm-store
    - echo "Install dependencies"
    - pnpm install # install dependencies
    - echo "Install GIT LFS"
    - apt-get update
    - apt-get install -y git-lfs
    - echo "Build Storybook"
    - pnpm build:storybook --quiet -o public
    - git checkout public/mockServiceWorker.js public/favicon.ico public/imgs/logo_text.svg
    image: mcr.microsoft.com/playwright:v1.32.1-focal
    stage: test
    script:
        - echo "Run storybook testing"
        - pnpm dlx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" "pnpm dlx http-server public -a 127.0.0.1 --port 6006" "pnpm dlx wait-on --timeout 300000 tcp:6006 && pnpm test-storybook --browsers chromium --junit"
    needs:
        - lint
    only:
        refs:
            - manual
            - merge_requests
    artifacts:
        when: always
        reports:
            junit:
                - junit.xml

@paescuj
Copy link
Collaborator

paescuj commented Apr 25, 2023

Thanks! Yeah, I meant the .gitlab-ci.yml config file 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants