Upgrade ci to test against all ruby versions (#76) #213
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: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| build: | |
| name: Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| database: [mysql, postgres, sqlite] | |
| ruby-version: | |
| - 3.1 | |
| - 3.2 | |
| - 3.3 | |
| - 3.4 | |
| - 4.0 | |
| services: | |
| mysql: | |
| image: mysql:8.0.31 | |
| env: | |
| MYSQL_ALLOW_EMPTY_PASSWORD: "yes" | |
| ports: | |
| - 33060:3306 | |
| options: --health-cmd "mysql -h localhost -e \"select now()\"" --health-interval 1s --health-timeout 5s --health-retries 30 | |
| postgres: | |
| image: postgres:15.1 | |
| env: | |
| POSTGRES_HOST_AUTH_METHOD: "trust" | |
| ports: | |
| - 55432:5432 | |
| env: | |
| TARGET_DB: ${{ matrix.database }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby-version }} | |
| - name: Install dependencies | |
| run: bundle install | |
| - name: Setup db | |
| run: | | |
| bin/rails db:setup | |
| - name: Run tests | |
| run: bin/test |