Skip to content

Commit

Permalink
Add Github action for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Ross Kaffenberger committed Jul 22, 2024
1 parent ca4ddc8 commit 701af47
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 73 deletions.
73 changes: 0 additions & 73 deletions .circleci/config.yml

This file was deleted.

64 changes: 64 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Tests

on:
pull_request:
branches:
- '*'
push:
branches:
- main
workflow_call:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['3.0', '3.1', '3.2', '3.3']
gemfile:
- rails_6.0
- rails_6.1
- rails_7.0
- rails_7.1
# Example for excluding a specific Ruby version with a specific Gemfile
# exclude:
# - ruby: '3.0'
# gemfile: 'rails_7.1'

env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
BUNDLE_PATH_RELATIVE_TO_CWD: true

steps:
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler: default
bundler-cache: true
rubygems: latest

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: yarn
cache-dependency-path: './test/sample/yarn.lock'

- name: Node version
run: |
node --version
- name: Install NPM packages for sample app
run: |
bundle exec rake app:yarn_install_frozen
- name: StandardRb check
run: bundle exec standardrb

- name: Run tests
run: |
bundle exec rails db:test:prepare
bundle exec rails test

0 comments on commit 701af47

Please sign in to comment.