diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml new file mode 100644 index 00000000..cf1ea945 --- /dev/null +++ b/.github/workflows/continuous-integration.yml @@ -0,0 +1,11 @@ +--- +name: Continuous Integration + +on: push + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - run: bash -x script/cibuild diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d58dddc9..00000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -sudo: true -services: - - docker -env: - - DOCKER_COMPOSE_VERSION=1.21.0 -before_install: - - sudo rm /usr/local/bin/docker-compose - - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose - - chmod 0755 docker-compose - - sudo mv docker-compose /usr/local/bin -install: true -script: "script/cibuild" -addons: - apt: - packages: - - docker-ce -notifications: - email: false - #irc: - #channels: "chat.freenode.net#tracks" - #skip_join: true diff --git a/Dockerfile b/Dockerfile index 37c63310..739c978f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ RUN touch /etc/app-env COPY Gemfile* /app/ RUN gem install bundler -RUN bundle install +RUN bundle install --jobs 4 RUN mkdir /app/log diff --git a/README.md b/README.md index 61c11321..6b1b8095 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ * Contributors: https://github.com/TracksApp/tracks/wiki/Contributors * Version: 2.4.0 -[![Build Status](https://travis-ci.org/TracksApp/tracks.svg?branch=master)](https://travis-ci.org/TracksApp/tracks) +[![Build Status](https://github.com/TracksApp/tracks/workflows/Continuous%20Integration/badge.svg)](https://github.com/TracksApp/tracks/actions) [![Code Climate](https://codeclimate.com/github/TracksApp/tracks/badges/gpa.svg)](https://codeclimate.com/github/TracksApp/tracks) Full instructions for both new installations and upgrades from older installations of Tracks diff --git a/script/cibuild b/script/cibuild index 702cf364..af04b27a 100755 --- a/script/cibuild +++ b/script/cibuild @@ -26,8 +26,8 @@ $docker_compose up -d script/poll-for-db # Leaving this in since it will be needed for Rails 5 -bin/rails db:environment:set RAILS_ENV=test || true +$docker_compose run web bin/rails db:environment:set RAILS_ENV=test || true -bin/rake db:reset -bin/rake test +$docker_compose run web bin/rake db:reset +$docker_compose run web bin/rake test