diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml new file mode 100644 index 0000000..3fc3100 --- /dev/null +++ b/.github/workflows/github-actions.yml @@ -0,0 +1,59 @@ +name: "Activities CI" +on: + push: + branches: [ $default-branch ] + pull_request: + branches: [ $default-branch ] +jobs: + test: + runs-on: ubuntu-latest + services: + postgres: + image: postgres:11-alpine + ports: + - "5432:5432" + env: + POSTGRES_DB: rails_test + POSTGRES_USER: rails + POSTGRES_PASSWORD: password + env: + RAILS_ENV: test + DATABASE_URL: "postgres://rails:password@localhost:5432/rails_test" + steps: + - name: Checkout code + uses: actions/checkout@v3 + # Add or replace dependency steps here + - name: Install Ruby and gems + uses: ruby/setup-ruby@ee2113536afb7f793eed4ce60e8d3b26db912da4 # v1.127.0 + with: + bundler-cache: true + # Add or replace database setup steps here + - name: Set up database schema + run: bin/rails db:schema:load + # Add or replace test runners here + - name: Run tests + run: bin/rake +# - name: Install dependencies (Ubuntu) +# +# if: runner.os == 'Linux' +# run: |- +# sudo apt-get update +# sudo apt-get install -y google-chrome-stable +# - uses: actions/checkout@v2 +# - run: sudo gem update --system +# - run: sudo gem install bundler +# - run: >- +# curl -O +# https://chromedriver.storage.googleapis.com/2.37/chromedriver_linux64.zip +# - run: unzip chromedriver_linux64.zip -d chromedriver +# - run: 'export PATH=$PATH:`pwd`/chromedriver' +# - run: >- +# curl -L +# https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 +# -o ./cc-test-reporter +# - run: chmod +x ./cc-test-reporter +# - run: ./cc-test-reporter before-build +# - run: cp config/database.yml.sample config/database.yml +# - run: 'bundle exec rake db:create db:migrate spec' +# - run: ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT +# diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7e471bd..0000000 --- a/.travis.yml +++ /dev/null @@ -1,47 +0,0 @@ -dist: trusty -sudo: false - -language: ruby - -rvm: - - 2.7.7 - -addons: - postgresql: "9.6" - apt: - packages: - - google-chrome-stable - -cache: bundler - -bundler_args: --jobs=3 --retry=3 --deployment --without development production - -env: - global: - - CC_TEST_REPORTER_ID=b5a454e6327e5f7d992fe50ae2c1f742f37e6fb536286312e0e11ddab193ca80 - -branches: - only: - - master - -before_install: - - gem update --system - - gem install bundler - -before_script: - - curl -O https://chromedriver.storage.googleapis.com/2.37/chromedriver_linux64.zip - - unzip chromedriver_linux64.zip -d chromedriver - - export PATH=$PATH:`pwd`/chromedriver - - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 -o ./cc-test-reporter - - chmod +x ./cc-test-reporter - - ./cc-test-reporter before-build - - cp config/database.yml.sample config/database.yml - -script: bundle exec rake db:create db:migrate spec - -after_script: - - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT - -notifications: - slack: - secure: c+9K1YyGPnoVYrGm5L47ojKu8cCBROSRnsB2O3FY3xfuD0CDtCTXrWQa1bOz02jnMbDmUe0BmP2dNM1m+I2Ppps3xDYIRMBIPYAJN30/ot4yCiJFKGbz2rjhzEun70yqV0h/ej+LC4Mx2/5FwACvLhw/EE0GRx64rT7Kju5LrLGmjpJYxvfvWQfKiJ4ggQSKAPe4CnKHtHTUkDlAjTi+dIFw1VYcd11IxKOizQsyQPU7ZNA3kb/dKcwcbhcm0EUrLXpJesxPVSC0v0NcYkaQACUVje9Sxo8wck/CTFDi8oZSE2aI+CiH6ekaSxNKuduk0mW7zEQzOfc7dhu9BGc4/5zCSAMJEkCsgZQAiSqvXy1K6rWy5XgphyBUCpoyFu+5umu7wniGA7kWojl5XwsIDap+rjhO3rIrfP2Jnvg8T2QHGY6TP1SLK9PHbwvDd+JeWoxllPu4xbhjuADzZH0ui3MODtjNpcRhBtUjDHl8OGLuVsxKQrn3GBNbCgS2+jKyo+R2JkxyOAAEGWIgyA6Sbpa2IxjjOLDxaNaDQeoY0YJaFbL4QHjC/Ppqs2FkR8LiEisy/l4w0HcaaRlehWgbnvL11PKSVOxWtUEUp2gLOFA9HnZe+fwUWxhuy5WJU+ilHOHwo/taWWy0sngesH8jj0ub9DfQEPWJ4FCzClZJ9z0=