From 38bb7046fd37607fc4876870502f30a532213d00 Mon Sep 17 00:00:00 2001 From: Phani Kumar Mallampati Date: Fri, 21 Jun 2024 16:29:37 -0700 Subject: [PATCH 1/7] jenkins ci to GH ci --- .github/workflows/ci.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..cf3939f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,28 @@ +name: Ruby-ci + +on: + push: + branches: [ "*" ] + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + ruby-version: ['2.4.2'] + + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby + uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - name: Run tests + run: bundle exec rspec --format RspecJunitFormatter --out test_results/rspec.xml --format progress From 9839bce997e7cdfb37f7f83405c6a7179b314a7b Mon Sep 17 00:00:00 2001 From: Phani Kumar Mallampati Date: Fri, 21 Jun 2024 16:33:52 -0700 Subject: [PATCH 2/7] jenkins ci to GH ci --- .github/workflows/ci.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf3939f..6a2579a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,12 +11,10 @@ permissions: jobs: build: - runs-on: ubuntu-latest strategy: matrix: ruby-version: ['2.4.2'] - steps: - uses: actions/checkout@v4 - name: Set up Ruby @@ -26,3 +24,21 @@ jobs: bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Run tests run: bundle exec rspec --format RspecJunitFormatter --out test_results/rspec.xml --format progress + + run_integration_tests: + runs-on: ubuntu-latest + strategy: + matrix: + ruby-version: [ '2.4.2' ] + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby + uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - name: Run tests + run: | + bundle check + bundle install + bundle exec ruby test_integration_app/main.rb From ddc143ada5006e7a3b3301807cf3bfcbdfa6070a Mon Sep 17 00:00:00 2001 From: Phani Kumar Mallampati Date: Fri, 21 Jun 2024 16:36:17 -0700 Subject: [PATCH 3/7] jenkins ci to GH ci --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a2579a..34f491f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,10 @@ on: pull_request: branches: [ "master" ] +env: + ACCOUNT_ID: ${{ secrets.ACCOUNT_ID }} + API_KEY: ${{ secrets.API_KEY }} + permissions: contents: read From 0bd5a9ae78f723a23fca3be4bce517586d5caef2 Mon Sep 17 00:00:00 2001 From: Phani Kumar Mallampati Date: Fri, 21 Jun 2024 16:37:34 -0700 Subject: [PATCH 4/7] jenkins ci to GH ci --- .github/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 34f491f..d0c3cfc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,11 @@ name: Ruby-ci on: push: - branches: [ "*" ] + branches: + - master pull_request: - branches: [ "master" ] + branches: + - master env: ACCOUNT_ID: ${{ secrets.ACCOUNT_ID }} @@ -31,6 +33,7 @@ jobs: run_integration_tests: runs-on: ubuntu-latest + if: ${{ github.ref == 'refs/heads/master' }} strategy: matrix: ruby-version: [ '2.4.2' ] From 363a1bf30efae4bec8ced2cd87c5fac2e9635988 Mon Sep 17 00:00:00 2001 From: Phani Kumar Mallampati Date: Mon, 24 Jun 2024 10:56:42 -0700 Subject: [PATCH 5/7] jenkins ci to GH ci --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0c3cfc..8782fc7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Ruby - uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0 + uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true # runs 'bundle install' and caches installed gems automatically From 83ece37b66468d1e6fc47661275f1b2552c30597 Mon Sep 17 00:00:00 2001 From: Phani Kumar Mallampati Date: Mon, 24 Jun 2024 11:49:40 -0700 Subject: [PATCH 6/7] jenkins ci to GH ci --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8782fc7..c00f18f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,6 +46,4 @@ jobs: bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Run tests run: | - bundle check - bundle install bundle exec ruby test_integration_app/main.rb From 63a179827fbaf906028cf26e05f7a51941b0c080 Mon Sep 17 00:00:00 2001 From: Phani Kumar Mallampati Date: Mon, 24 Jun 2024 12:53:14 -0700 Subject: [PATCH 7/7] jenkins ci to GH ci --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c00f18f..193c3a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Ruby - uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0 + uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true # runs 'bundle install' and caches installed gems automatically