From ed67c94bdc87c35e19a3dbb5b29237f707bc7e68 Mon Sep 17 00:00:00 2001 From: Antony Date: Fri, 10 Jan 2025 09:22:19 +0200 Subject: [PATCH 1/6] Create CODEOWNERS --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..c9686c63 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +@softservedata From 3ae2a6b28061e697a421337abe50d81780fc7fa9 Mon Sep 17 00:00:00 2001 From: Antony Date: Fri, 10 Jan 2025 09:25:25 +0200 Subject: [PATCH 2/6] Create pull_request_template.md --- .github/pull_request_template.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..378b862f --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,9 @@ +## Describe your changes + +## Issue ticket number and link + +## Checklist before requesting a review +- [ ] I have performed a self-review of my code +- [ ] If it is a core feature, I have added thorough tests +- [ ] Do we need to implement analytics? +- [ ] Will this be part of a product update? If yes, please write one phrase about this update From eb5de18aea1e7c0e1af750679b8d707da17e2e2e Mon Sep 17 00:00:00 2001 From: Antony Date: Sun, 12 Jan 2025 22:20:54 +0200 Subject: [PATCH 3/6] Create blank.yml --- .github/workflows/blank.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/blank.yml diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml new file mode 100644 index 00000000..2ed4e2a4 --- /dev/null +++ b/.github/workflows/blank.yml @@ -0,0 +1,36 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the "develop" branch + push: + branches: [ "develop" ] + pull_request: + branches: [ "develop" ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v4 + + # Runs a single command using the runners shell + - name: Run a one-line script + run: echo Hello, world! + + # Runs a set of commands using the runners shell + - name: Run a multi-line script + run: | + echo Add other actions to build, + echo test, and deploy your project. From 682d7013efbd5786079faf07f227e3e4b05a4351 Mon Sep 17 00:00:00 2001 From: Antony Date: Sun, 12 Jan 2025 22:56:58 +0200 Subject: [PATCH 4/6] Update ruby.yml --- .github/workflows/ruby.yml | 71 +++++++++++--------------------------- 1 file changed, 20 insertions(+), 51 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 31cda7e6..3e6f1f63 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -1,64 +1,33 @@ -# 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. - -# GitHub recommends pinning actions to a commit SHA. -# To get a newer version, you will need to update the SHA. -# You can also reference a tag or branch, but the action may change without warning. - -name: Ruby - -env: - SECRETS_TOKEN: ${{ secrets.PAT }} +name: CI Pipeline on: push: - branches: [ main, develop ] + branches: + - main pull_request: - branches: [ main, develop ] - workflow_dispatch: + branches: + - main jobs: test: runs-on: ubuntu-latest - + steps: - - name: Install my-app token - id: my-app - uses: getsentry/action-github-app-token@v3 - with: - app_id: ${{ secrets.APP_ID }} - private_key: ${{ secrets.APP_PRIVATE_KEY }} - - uses: actions/checkout@v4 - - name: Add outside users to organization - run: | - users=$(curl -L -s \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ steps.my-app.outputs.token }}" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/repos/${{ github.repository_owner }}/${{ github.event.repository.name }}/collaborators?affiliation=outside \ - | jq '.[] .id') - for user in $users - do - curl -s -L -o /dev/null \ - -X POST \ - -H "Accept: application/vnd.github+json" \ - -H "Authorization: Bearer ${{ steps.my-app.outputs.token }}" \ - -H "X-GitHub-Api-Version: 2022-11-28" \ - https://api.github.com/orgs/${{ github.repository_owner }}/invitations \ - -d "{\"invitee_id\": $user}" - done + - name: Checkout code + uses: actions/checkout@v4 + + - name: Authenticate with PAT + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + run: echo "Authenticated using PAT" + - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: '3.2' - working-directory: '.github/tests' - bundler-cache: true + ruby-version: 3.2 + + - name: Install dependencies + run: bundle install + - name: Run tests - env: - URL: ${{ github.repository }} - TOKEN: ${{ steps.my-app.outputs.token }} - working-directory: '.github/tests' - run: - ruby test/script_test.rb + run: bundle exec rspec From 76f27e97f5bae982a6d9d806137639b962a681e2 Mon Sep 17 00:00:00 2001 From: Antony Date: Sun, 12 Jan 2025 23:17:40 +0200 Subject: [PATCH 5/6] Update ruby.yml --- .github/workflows/ruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 3e6f1f63..24d06a7a 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -27,7 +27,7 @@ jobs: ruby-version: 3.2 - name: Install dependencies - run: bundle install + run: bundle install - name: Run tests run: bundle exec rspec From 285a84f9a3b2b746bde98a2f088e54c775a581e5 Mon Sep 17 00:00:00 2001 From: Antony Date: Sun, 12 Jan 2025 23:18:42 +0200 Subject: [PATCH 6/6] Update Gemfile --- .github/tests/Gemfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/tests/Gemfile b/.github/tests/Gemfile index d2403f18..c16d2dde 100644 --- a/.github/tests/Gemfile +++ b/.github/tests/Gemfile @@ -1,5 +1,8 @@ # frozen_string_literal: true +# Gemfile source "https://rubygems.org" +gem "rspec" + # gem "rails"