Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
hahwul committed Jan 31, 2024
1 parent e4878ee commit 67efa22
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 75 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
actions: read
contents: read
security-events: write

jobs:
rubocop:

runs-on: ubuntu-latest
strategy:
fail-fast: false

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Rubocop run
run: |
bash -c "
bundle exec rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif
[[ $? -ne 2 ]]
"
- name: Upload Sarif output
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: rubocop.sarif

tests:

runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['2.7', '3.0', '3.1', '3.2', '3.3']

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
run: bundle exec rake
32 changes: 0 additions & 32 deletions .github/workflows/rspec.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/rubocop.yml

This file was deleted.

3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source "https://rubygems.org"

gemspec
7 changes: 7 additions & 0 deletions zaproxy.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,11 @@ Gem::Specification.new do |spec|
# Uncomment to register a new dependency of your gem
# spec.add_dependency "example-gem", "~> 1.0"
spec.metadata['rubygems_mfa_required'] = 'true'

spec.add_development_dependency("bundler")
spec.add_development_dependency("code-scanning-rubocop", "~> 0.6.1")
spec.add_development_dependency("rubocop", "~> 1.57")
spec.add_development_dependency("rubocop-minitest", "~> 0.33.0")
spec.add_development_dependency("rubocop-rake", "~> 0.6.0")
spec.add_development_dependency("rubocop-shopify", "~> 2.14")
end

0 comments on commit 67efa22

Please sign in to comment.