From 80fe30041961bbee5c7a01b05ec5057142d9a514 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Tue, 9 May 2023 17:43:04 -0400 Subject: [PATCH 1/6] Actually specify the branch for GH Actions --- .github/workflows/codeql.yml | 7 ++++--- .github/workflows/dependency-review.yml | 7 ++++++- .github/workflows/ruby.yml | 8 +++++--- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 84eda52f..095f579e 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -13,10 +13,11 @@ name: CodeQL on: push: - branches: [ $default-branch ] + branches: + - master pull_request: - # The branches below must be a subset of the branches above - branches: [ $default-branch ] + branches: + - master schedule: - cron: '45 10 * * 6' diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index b51fee1f..c08fb8e3 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -6,7 +6,12 @@ # Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement name: Dependency Review on: - - pull_request + push: + branches: + - master + pull_request: + branches: + - master permissions: contents: read diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 94d46ba1..893c1c9c 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -2,9 +2,11 @@ name: Ruby on: push: - branches: [ $default-branch ] + branches: + - master pull_request: - branches: [ $default-branch ] + branches: + - master permissions: contents: read @@ -47,7 +49,7 @@ jobs: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true - name: Lint - run: rubocop + run: bundle exec rubocop - name: Run tests run: bundle exec rspec - name: Report coverage From b6b07bd679bc8c86990657a07db93728c9b62c40 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Tue, 9 May 2023 17:50:49 -0400 Subject: [PATCH 2/6] separate lint and coverage from test action --- .github/workflows/ruby.yml | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 893c1c9c..90976824 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -12,6 +12,17 @@ permissions: contents: read jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.2.2 + bundler-cache: true + - name: Lint + run: bundle exec rubocop test: runs-on: ubuntu-latest strategy: @@ -48,9 +59,18 @@ jobs: with: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true - - name: Lint - run: bundle exec rubocop - name: Run tests run: bundle exec rspec - - name: Report coverage + coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.2.2 + bundler-cache: true + - name: Run tests + run: bundle exec rspec + - name: Report test coverage uses: coverallsapp/github-action@v1 From 2de905c1ad1a59d37c972703ab73cbdc2d01df2e Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Tue, 9 May 2023 17:55:06 -0400 Subject: [PATCH 3/6] exclude vendor from rubocop action --- .rubocop.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.rubocop.yml b/.rubocop.yml index 49e8b479..c07e7f66 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -17,6 +17,7 @@ AllCops: - 'pkg/**/*' - 'reports/**/*' - 'tmp/**/*' + - 'vendor/**/*' TargetRubyVersion: 2.7.0 #################### Layout ########################### From 20f71209ba1cdf07e1c86ec68fea9cca7ea4b0db Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Tue, 9 May 2023 18:10:47 -0400 Subject: [PATCH 4/6] remove travis ci config --- .travis.yml | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5e78ea79..00000000 --- a/.travis.yml +++ /dev/null @@ -1,41 +0,0 @@ -env: - global: - - CC_TEST_REPORTER_ID=6f07a33d1bf4060910c8b97cb9bf97230bbf1fad75765fef98f3cca9f29cd6b0 -language: ruby -before_install: - - gem install bundler -install: - - bundle install --without local -rvm: - - 3.2.2 - - 3.2.1 - - 3.2.0 - - 3.1.4 - - 3.1.3 - - 3.1.2 - - 3.1.1 - - 3.1.0 - - 3.0.6 - - 3.0.5 - - 3.0.4 - - 3.0.3 - - 3.0.2 - - 3.0.1 - - 3.0.0 - - 2.7.8 - - 2.7.7 - - 2.7.6 - - 2.7.5 - - 2.7.4 - - 2.7.3 - - 2.7.2 - - 2.7.1 - - 2.7.0 -before_script: - - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - - chmod +x ./cc-test-reporter - - ./cc-test-reporter before-build -script: - - bundle exec rspec -after_script: - - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT From 4fa8caf91cb1009266c2706fb3c8af00ff61ebae Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Tue, 9 May 2023 18:10:59 -0400 Subject: [PATCH 5/6] use coveralls secret --- .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 90976824..0503f631 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -71,6 +71,6 @@ jobs: ruby-version: 3.2.2 bundler-cache: true - name: Run tests - run: bundle exec rspec + run: COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }} bundle exec rspec - name: Report test coverage uses: coverallsapp/github-action@v1 From 90054e0a8c5d52ebc21bb86b2fde9874a1ca5667 Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Tue, 9 May 2023 18:12:51 -0400 Subject: [PATCH 6/6] remove unnecessary coveralls action --- .github/workflows/ruby.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 0503f631..8c71c976 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -70,7 +70,5 @@ jobs: with: ruby-version: 3.2.2 bundler-cache: true - - name: Run tests + - name: Run tests and report test coverage run: COVERALLS_REPO_TOKEN=${{ secrets.COVERALLS_REPO_TOKEN }} bundle exec rspec - - name: Report test coverage - uses: coverallsapp/github-action@v1