From 35866019355f7d44b39d5911b6d54534da9d1620 Mon Sep 17 00:00:00 2001 From: Sandeep Tiwari Date: Mon, 12 Jan 2026 22:34:15 +0530 Subject: [PATCH] migrating to github actions --- .github/workflows/ci_steps.yml | 50 ++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/ci_steps.yml diff --git a/.github/workflows/ci_steps.yml b/.github/workflows/ci_steps.yml new file mode 100644 index 0000000..bb09155 --- /dev/null +++ b/.github/workflows/ci_steps.yml @@ -0,0 +1,50 @@ +# This workflow uses actions that are not certified by GitHub. They are +# provided by a third-party and are governed by separate terms of service, +# privacy policy, and support documentation. +# +# This workflow will install a prebuilt Ruby version, install dependencies, and +# run tests and linters. +name: "Frederick API Gem CI" +on: [push, pull_request] + +env: + RUBY_VERSION: 2.4.3 + DOCKER: true + RAILS_ENV: test + +jobs: + # RSpec tests + rspec-tests: + name: "RSpec Tests" + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Ruby and gems + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ env.RUBY_VERSION }} + bundler-cache: true + + - name: Run RSpec tests + run: bundle exec rspec + + # Rubocop linting + lint: + name: "Lint" + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Ruby and gems + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ env.RUBY_VERSION }} + bundler-cache: true + + - name: Lint Ruby files + run: bundle exec rubocop \ No newline at end of file