Application pushed to GitHub does not build in Travis CI

Asked 1 years ago, Updated 1 years ago, 67 views

What do you want to do

When you push the Rails app built in Docker to GitHub, you want to run a test with Travis CI and build it.

Situation

Running the rails test inside the container on the Docker is fine.
I have confirmed that the app starts with localhost.

docker-compose.yml Contents

version: '3'

volumes:
  db-data:

services:
  web:
    build:.
    ports:
      - '3000:3000'
    volumes:
      - '.:/product-register'
    environment:
      - 'DATABASE_PASSWORD=postgres'
    tty —true
    stdin_open —true
    depend_on:
      - db
    links:
      - db

  db:
    image —postgres
    volumes:
      - 'db-data: /var/lib/postgresql/data'
    environment:
      - 'POSTGRES_HOST_AUTH_METHOD=trust'
      - 'POSTGRES_USER=postgres'
      - 'POSTGRES_PASSWORD=postgres'

.travis.yml Contents

 sudo:required

services:docker

before_install:
  - docker login-uppolymetisoutis-p5fb47200-dd19-4772-a9ad-c98913ef1cb9
  - docker-compose up --build-d

script:
  - docker-compose exec -- env'RAILS_ENV = test' web rails db:create
  - docker-compose exec -- env'RAILS_ENV = test' web rails db:migrate
  - docker-compose exec -- env'RAILS_ENV = test' web rails test

GitHub < https://github.com/PolymetisOutis/product-register

Background

git add.
git commit-m"
After
git push origin master
I did.
git push origin master
In the process, Travis CI and GitHub are able to work together and should be built and tested, but not built.

What should I do?

Add

docs.travis-ci.com/user/tutorial
I would like to add the information in .
To get started with Travis CI using GitHub
By the way, regarding ② ③ に,
③So, isn't the green activate button the Sync Account button?
"When I press this, it becomes ""Sync form GitHub"", and it's hard for me to sync it."
Enter a description of the image here
Even if the screen appears to be finished, it will always be loading.

Thank you.

ruby-on-rails docker docker-compose travis-ci

2022-09-30 16:54

1 Answers

"When I press this, it becomes ""Sync form GitHub"", and it's hard for me to sync it."

This is the reason.

This issue has also been talked about in the Travis CI forum, and as far as I know, it should be unresolved...

The following is a summary of the forum:

  • You may log out and log in to Travis CI for resolution.
  • If that doesn't work, I've solved it by contacting Travis CI support to have my account fixed.

https://travis-ci.community/t/stuck-on-syncing-from-github/2882


2022-09-30 16:54

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.