Merge pull request #116 from hovancik/dependabot/bundler/action_text-… #171
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| ports: ['5432:5432'] | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 3.4.1 | |
| bundler-cache: true | |
| - name: Setup the Rails application | |
| env: | |
| RAILS_ENV: test | |
| run: | | |
| sudo apt-get -yqq install libpq-dev build-essential | |
| cp config/database.github.yml config/database.yml | |
| bundle exec rails db:create | |
| bundle exec rails db:migrate | |
| - name: Run unit tests | |
| run: bundle exec rails test | |
| env: | |
| TEST_EMAIL: a@b.cd |