diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index d501c4f..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,39 +0,0 @@ - -version: 2 -jobs: - build: - working_directory: ~/BookingSync/bookingsync-sidekiq-pro-extended-metrics-collector - parallelism: 1 - docker: - - image: circleci/ruby:2.6.5-node - - image: redis - steps: - - checkout - - run: mkdir /tmp/circleci-test-results - - restore_cache: - keys: - - v1-gemfile-lock-{{ checksum "Gemfile.lock" }} - - run: - name: Install bundler - command: gem install bundler - - run: - name: Installing dependencies - command: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs 4 --retry 3 - - save_cache: - key: v1-gemfile-lock-{{ checksum "Gemfile.lock" }} - paths: - - vendor/bundle - - ~/.bundle - - run: - name: Installing dockerize - command: wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz && sudo tar -C /usr/local/bin -xzvf dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz && rm dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz - environment: - DOCKERIZE_VERSION: v0.6.1 - - run: - name: Running specs - command: | - bundle exec rake - environment: - REDIS_URL: redis://localhost:6379/1 - - store_test_results: - path: /tmp/circleci-test-results diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a2b167f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +name: CI +on: [pull_request] +jobs: + rspec: + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + ruby: ['2.7', '3.0.6', '3.1', '3.2'] + runs-on: ubuntu-latest + env: + DD_PROFILING_NO_EXTENSION: true + RAILS_ENV: test + RACK_ENV: test + REDIS_URL: redis://localhost:6379/1 + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: sidekiq-metrics-test + services: + postgres: + image: postgres:14 + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: sidekiq-metrics-test + ports: + - 5432:5432 + options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + redis: + image: redis + ports: + - 6379:6379 + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + steps: + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + - run: bundle exec rspec diff --git a/CHANGELOG.md b/CHANGELOG.md index 310a399..39b13bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## [Unreleased] +- Move to GH Actions + ## [0.1.0] - Release publicly