diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..71608fe --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.3.0 + + - name: Install dependencies + run: | + gem install bundler + bundle install + + - name: Set up database + run: bundle exec rails db:create db:migrate + env: + RAILS_ENV: test + + - name: Run tests + run: bundle exec rspec + env: + RAILS_ENV: test