Skip to content

Commit

Permalink
Merge pull request #1 from Darhazer/ci
Browse files Browse the repository at this point in the history
Enable tests via GitHub Actions
  • Loading branch information
Darhazer authored Jul 4, 2024
2 parents 6d630e2 + cabff6f commit 2c69115
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 6 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Unit tests

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['2.7']

steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Prepare test database
run: bundle exec rake db:setup
- name: Run tests
run: bundle exec rspec
6 changes: 0 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,3 @@ RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = Dir.glob('spec/**/*_spec.rb')
t.rspec_opts = '--format documentation'
end

task :travis do
Rake::Task['db:setup'].invoke
Rake::Task[:spec].invoke
end

0 comments on commit 2c69115

Please sign in to comment.