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

Xvfb missing #1114

Closed
dapo-maraboo opened this issue Jan 22, 2024 · 7 comments
Closed

Xvfb missing #1114

dapo-maraboo opened this issue Jan 22, 2024 · 7 comments

Comments

@dapo-maraboo
Copy link

I keep getting this error locally using cypress-io/github-action@v6 what am I missing? I thought it should already come with all the required dependencies

Screenshot 2024-01-22 at 13 20 32
@MikeMcC399
Copy link
Collaborator

@dapo-maraboo

I keep getting this error locally using cypress-io/github-action@v6 what am I missing? I thought it should already come with all the required dependencies

Are you using a GitHub-hosted runner or a self-hosted runner? Am I right that when you say "locally using cypress-io/github-action@v6" you mean that you are using a self-hosted runner?

GitHub-hosted ubuntu-22.04 has xvfb 2:21.1.4-2ubuntu1.7~22.04.5 pre-installed (see Installed apt packages).

If you are using a self-hosted runner, then you will need to make sure that the dependencies listed under https://on.cypress.io/required-dependencies for Ubuntu are already installed on your runner:

apt-get install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libnss3 libxss1 libasound2 libxtst6 xauth xvfb

@dapo-maraboo
Copy link
Author

Thanks @MikeMcC399 I look into your suggestions
When I said locally I meant using the act package to run the ci process locally on my machine (Macbook Intel chip).

@MikeMcC399
Copy link
Collaborator

@dapo-maraboo

I look into your suggestions

Good. If you still have an issue, please explain what command you are using to run CI.

When I said locally I meant using the act package to run the ci process locally on my machine (Macbook Intel chip).

cypress-io/github-action@v6 only runs on a GitHub runner so there may be a misunderstanding.

@dapo-maraboo
Copy link
Author

Still having some issues, cypress cant seem to connect to the api server within the CI
I dont know what I'm missing

`  services:
  postgres:
    image: postgres:12-alpine
    env:
      POSTGRES_PASSWORD: postgres
      POSTGRES_USER: postgres
      POSTGRES_DB: mbtestdb
    options: >-
      --health-cmd pg_isready
      --health-interval 10s
      --health-timeout 5s
      --health-retries 5
    ports:
      - 5432:5432        

steps:
  - name: Checkout code
    uses: actions/checkout@v4

  - name: Build and Tag Docker Images
    env:
      IMAGE_TAG: ${{ github.sha }}
    run: |
      docker build -t tests --build-arg BUILDKIT_INLINE_CACHE=1 --target test .
    
  - name: Start the MarabooApi
    run: |
      docker run  -d \
        -e APP_ENV="test" \
        -e BASE_DIR="./" \
        -e DB_USER=postgres \
        -e DB_PASSWD=postgres \
        -e DB_DATABASE=mbtestdb \
        -e DB_HOST=localhost \
        -e GOOGLE_CLIENT_IDS="test_client_id_one","test_client_id_two" \
        -e DB_PORT=5432 \
        -v .:/swapapp/ \
        -p 8080:8080 \
        --network host \
        --rm tests:latest
      
- name: Check api status
   run: |
     curl -v http://localhost:8080
  - name: Install Yarn
    run: npm install -g yarn

  - name: Cypress run
    uses: cypress-io/github-action@v6
    with:
      wait-on: http://localhost:8080
      project: ${{ github.workspace }}/cypress`

@MikeMcC399
Copy link
Collaborator

@dapo-maraboo

Have you resolved the issue with xvfb?

@dapo-maraboo
Copy link
Author

Yes I have

@MikeMcC399
Copy link
Collaborator

@dapo-maraboo

Since your original issue is resolved I am going to close this issue.

The issue list here is intended for users to report bugs in the action. It is not primarily intended as a "how-to" support tool.

You can open a new issue for your follow-on problem, however you should be prepared to supply your full workflow and log files.

The Cypress technical community on Discord may also be able to help you:

Discord chat (click on button)

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

No branches or pull requests

2 participants