summaryrefslogtreecommitdiffhomepage
path: root/.github
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-03-30 19:03:22 +0900
committerAdam Malczewski <[email protected]>2026-03-30 19:03:22 +0900
commit952c6b565832dd0dbcef7a9a80edc871f79e15a8 (patch)
tree698db27a35f8f40356a0381a32a02767481dc6a9 /.github
downloaddispatch-api-952c6b565832dd0dbcef7a9a80edc871f79e15a8.tar.gz
dispatch-api-952c6b565832dd0dbcef7a9a80edc871f79e15a8.zip
Diffstat (limited to '.github')
-rw-r--r--.github/dependabot.yml12
-rw-r--r--.github/workflows/ci.yml52
2 files changed, 64 insertions, 0 deletions
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..83610cf
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,12 @@
+version: 2
+updates:
+- package-ecosystem: bundler
+ directory: "/"
+ schedule:
+ interval: weekly
+ open-pull-requests-limit: 10
+- package-ecosystem: github-actions
+ directory: "/"
+ schedule:
+ interval: weekly
+ open-pull-requests-limit: 10
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..2098f1f
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,52 @@
+name: CI
+
+on:
+ pull_request:
+ push:
+ branches: [ main ]
+
+jobs:
+ scan_ruby:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v6
+
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ bundler-cache: true
+
+ - name: Scan for common Rails security vulnerabilities using static analysis
+ run: bin/brakeman --no-pager
+
+ - name: Scan for known security vulnerabilities in gems used
+ run: bin/bundler-audit
+
+ lint:
+ runs-on: ubuntu-latest
+ env:
+ RUBOCOP_CACHE_ROOT: tmp/rubocop
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v6
+
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ bundler-cache: true
+
+ - name: Prepare RuboCop cache
+ uses: actions/cache@v4
+ env:
+ DEPENDENCIES_HASH: ${{ hashFiles('.ruby-version', '**/.rubocop.yml', '**/.rubocop_todo.yml', 'Gemfile.lock') }}
+ with:
+ path: ${{ env.RUBOCOP_CACHE_ROOT }}
+ key: rubocop-${{ runner.os }}-${{ env.DEPENDENCIES_HASH }}-${{ github.ref_name == github.event.repository.default_branch && github.run_id || 'default' }}
+ restore-keys: |
+ rubocop-${{ runner.os }}-${{ env.DEPENDENCIES_HASH }}-
+
+ - name: Lint code for consistent style
+ run: bin/rubocop -f github
+