Extract common checks to its own workflow to only run once
This commit is contained in:
@@ -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
|
||||
@@ -4,7 +4,7 @@ on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
call-ci:
|
||||
uses: ./.github/workflows/ci.yml
|
||||
test:
|
||||
uses: ./.github/workflows/test.yml
|
||||
with:
|
||||
saas: false
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user