Skip to content

Commit

Permalink
github action for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
scambra committed Sep 25, 2024
1 parent 3554ae9 commit e99c2dc
Showing 1 changed file with 96 additions and 0 deletions.
96 changes: 96 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: activescaffold/active_scaffold
on:
push:
pull_request:
concurrency:
group: "${{ github.ref }}"
cancel-in-progress: true
env:
CC_TEST_REPORTER_ID: 8a344833c6693733b163f09a5243fa12dd7be0b69f0358b146c64dd4becabc60
jobs:
lint-brakeman:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4.1.0
with:
lfs: true
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: bundle exec brakeman --exit-on-warn --output brakeman/index.html
- uses: actions/upload-artifact@v4.1.0
if: always()
with:
name: "${{ github.job }}"
retention-days: 1
path: brakeman
lint-bundler-audit:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4.1.0
with:
lfs: true
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: bundle exec bundle-audit check --update --verbose
lint-i18n:
runs-on: ubuntu-latest
container:
image: ruby:3.0-alpine
timeout-minutes: 60
continue-on-error: true
steps:
- uses: actions/checkout@v4.1.0
with:
lfs: true
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: bundle exec i18n-tasks health
lint-rubocop:
runs-on: ubuntu-latest
container:
image: ruby:3.0-alpine
timeout-minutes: 60
steps:
- uses: actions/checkout@v4.1.0
with:
lfs: true
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: bundle exec rubocop
test:
name: Ruby ${{ matrix.ruby }} / Rails ${{ matrix.rails }}
needs:
- lint-brakeman
- lint-bundler-audit
- lint-i18n
- lint-rubocop
runs-on: ubuntu-latest
matrix:
ruby: [ "3.2", "3.1", "3.0", "2.7", "2.6", "2.5", jruby-9.4 ]
rails: [ "6.1", "6.0", "5.2" ]
timeout-minutes: 60
env:
JRUBY_OPTS: "--debug"
LC_ALL: C.UTF-8
RAILS_ENV: test
BUNDLE_GEMFILE: gemfiles/Gemfile.rails-${{ matrix.rails }}.x
steps:
- uses: actions/checkout@v4.1.0
with:
lfs: true
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: bundle exec rake
- uses: actions/upload-artifact@v4.1.0
if: success()
with:
name: "${{ github.job }}"
retention-days: 1
path: coverage

0 comments on commit e99c2dc

Please sign in to comment.