Extract common checks to its own workflow to only run once

This commit is contained in:
Jorge Manrubia
2025-11-27 07:57:08 +01:00
parent 25cfa42872
commit f174058f43
4 changed files with 46 additions and 41 deletions
+41
View File
@@ -0,0 +1,41 @@
name: Checks
on:
push:
pull_request:
jobs:
security:
name: Security
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Gem audit
run: bin/bundler-audit check --update
- name: Importmap audit
run: bin/importmap audit
- name: Brakeman audit
run: bin/brakeman --quiet --no-pager --exit-on-warn --exit-on-error
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Lint code for consistent style
run: bin/rubocop
+2 -2
View File
@@ -4,7 +4,7 @@ on:
pull_request:
jobs:
call-ci:
uses: ./.github/workflows/ci.yml
test:
uses: ./.github/workflows/test.yml
with:
saas: false
+2 -2
View File
@@ -4,8 +4,8 @@ on:
push:
jobs:
call-ci:
uses: ./.github/workflows/ci.yml
test:
uses: ./.github/workflows/test.yml
with:
saas: true
secrets:
@@ -1,4 +1,4 @@
name: Common CI
name: Test
on:
workflow_call:
@@ -11,42 +11,6 @@ on:
required: false
jobs:
security:
name: Security
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Gem audit
run: bin/bundler-audit check --update
- name: Importmap audit
run: bin/importmap audit
- name: Brakeman audit
run: bin/brakeman --quiet --no-pager --exit-on-warn --exit-on-error
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
bundler-cache: true
- name: Lint code for consistent style
run: bin/rubocop
test:
name: Tests (${{ matrix.mode }})
runs-on: ubuntu-latest