From cdf92e0de2352567f2ae4085a060bb06c1f8a982 Mon Sep 17 00:00:00 2001 From: Karthik Sivadas Date: Fri, 5 Apr 2024 18:31:16 +0530 Subject: [PATCH] feat: move integrations gem github actions to root --- .github/workflows/integrations-ci.yml | 44 +++++++++++++++++++++++++ .github/workflows/integrations-main.yml | 33 +++++++++++++++++++ integrations/.github/workflows/ci.yml | 34 ------------------- integrations/.github/workflows/main.yml | 27 --------------- 4 files changed, 77 insertions(+), 61 deletions(-) create mode 100644 .github/workflows/integrations-ci.yml create mode 100644 .github/workflows/integrations-main.yml delete mode 100644 integrations/.github/workflows/ci.yml delete mode 100644 integrations/.github/workflows/main.yml diff --git a/.github/workflows/integrations-ci.yml b/.github/workflows/integrations-ci.yml new file mode 100644 index 00000000..262b04a6 --- /dev/null +++ b/.github/workflows/integrations-ci.yml @@ -0,0 +1,44 @@ +name: CI - Integrations +on: + push: + paths: + - "integrations/**" + +env: + CI: true +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + ruby-version: [3.2.0] + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby ${{ matrix.ruby-version }} + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + + - name: Install dependencies + run: | + gem install bundler + bundle install --jobs 4 --retry 3 + working-directory: ./integrations + + - name: Run tests with code coverage + run: COVERAGE=true bundle exec rspec + working-directory: ./integrations + + - name: Install Code Climate Test Reporter + run: | + curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter + chmod +x ./cc-test-reporter + working-directory: ./integrations + + - name: Push coverage data to Code Climate + env: + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + run: | + ./cc-test-reporter before-build + ./cc-test-reporter after-build --exit-code $? + working-directory: ./integrations diff --git a/.github/workflows/integrations-main.yml b/.github/workflows/integrations-main.yml new file mode 100644 index 00000000..6d6b148b --- /dev/null +++ b/.github/workflows/integrations-main.yml @@ -0,0 +1,33 @@ +name: Ruby - Integrations + +on: + push: + branches: + - main + paths: + - "integrations/**" + + pull_request: + paths: + - "integrations/**" + +jobs: + build: + runs-on: ubuntu-latest + name: Ruby ${{ matrix.ruby }} + strategy: + matrix: + ruby: + - "3.2.0" + + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + + - name: Run the default task + run: bundle exec rake + working-directory: ./integrations diff --git a/integrations/.github/workflows/ci.yml b/integrations/.github/workflows/ci.yml deleted file mode 100644 index acca38b1..00000000 --- a/integrations/.github/workflows/ci.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: CI -on: [push] -env: - CI: true -jobs: - test: - runs-on: ubuntu-latest - strategy: - matrix: - ruby-version: [3.2.0] - steps: - - uses: actions/checkout@v2 - - name: Set up Ruby ${{ matrix.ruby-version }} - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby-version }} - - name: Install dependencies - run: | - gem install bundler - bundle install --jobs 4 --retry 3 - - name: Run tests with code coverage - run: COVERAGE=true bundle exec rspec - - name: Install Code Climate Test Reporter - run: | - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - chmod +x ./cc-test-reporter - working-directory: ${{ github.workspace }} - - name: Push coverage data to Code Climate - env: - CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} - run: | - ./cc-test-reporter before-build - ./cc-test-reporter after-build --exit-code $? - working-directory: ${{ github.workspace }} \ No newline at end of file diff --git a/integrations/.github/workflows/main.yml b/integrations/.github/workflows/main.yml deleted file mode 100644 index c81a1ae8..00000000 --- a/integrations/.github/workflows/main.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Ruby - -on: - push: - branches: - - main - - pull_request: - -jobs: - build: - runs-on: ubuntu-latest - name: Ruby ${{ matrix.ruby }} - strategy: - matrix: - ruby: - - '3.2.0' - - steps: - - uses: actions/checkout@v4 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby }} - bundler-cache: true - - name: Run the default task - run: bundle exec rake