diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index ba26bc4..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,59 +0,0 @@ -version: 2.1 - -references: - bundle_install: &bundle_install - run: - name: Bundle - command: | - gem install bundler --no-document && \ - bundle config set no-cache 'true' && \ - bundle config set jobs '4' && \ - bundle config set retry '3' && \ - bundle install - - cache_bundle: &cache_bundle - save_cache: - key: bundle-<< parameters.ruby_version >>-{{ checksum "que.gemspec" }}-{{ checksum "Gemfile" }} - paths: - - vendor/bundle - - restore_bundle: &restore_bundle - restore_cache: - key: bundle-<< parameters.ruby_version >>-{{ checksum "que.gemspec" }}-{{ checksum "Gemfile" }} - -jobs: - rspec: - working_directory: ~/que - parameters: - ruby_version: - type: string - docker: - - image: cimg/ruby:<< parameters.ruby_version >> - environment: - PGDATABASE: que-test - PGUSER: ubuntu - PGPASSWORD: password - PGHOST: localhost - - image: postgres:11.2 - environment: - POSTGRES_DB: que-test - POSTGRES_USER: ubuntu - POSTGRES_PASSWORD: password - steps: - - add_ssh_keys - - checkout - - *restore_bundle - - *bundle_install - - *cache_bundle - - run: - name: Run specs - command: bundle exec rspec - -workflows: - version: 2 - tests: - jobs: - - rspec: - matrix: - parameters: - ruby_version: ["2.6", "2.7", "3.0"] diff --git a/.github/workflows/specs.yml b/.github/workflows/specs.yml new file mode 100644 index 0000000..7a86fa3 --- /dev/null +++ b/.github/workflows/specs.yml @@ -0,0 +1,50 @@ +name: Run Specs + +on: + push: +permissions: + contents: read + # We need write access to the id-token to use workload identity federation + id-token: write + packages: read + # Needed for getting PR labels + pull-requests: read + + +env: + PGDATABASE: que-test + PGUSER: ubuntu + PGPASSWORD: password + PGHOST: localhost + +jobs: + rspec: + runs-on: ubuntu-latest + strategy: + matrix: + ruby_version: ["2.6", "2.7", "3.0"] + + services: + postgres: + image: postgres:11.2 + env: + POSTGRES_DB: que-test + POSTGRES_USER: ubuntu + POSTGRES_PASSWORD: password + POSTGRES_HOST_AUTH_METHOD: trust + ports: + - 5432:5432 + + steps: + - name: Check Out Code + uses: actions/checkout@v2 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + ruby-version: "${{ matrix.ruby-version }}" + + - name: Run Specs + run: | + bundle exec rspec \ No newline at end of file