Route generation #271
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: Ruby | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| name: Linter | |
| env: | |
| BUNDLE_JOBS: 4 | |
| BUNDLE_RETRY: 3 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: "4.0" | |
| bundler: latest | |
| bundler-cache: true | |
| - name: Run StandardRB | |
| run: bundle exec standardrb | |
| build: | |
| services: | |
| postgres: | |
| image: postgres:14 | |
| env: | |
| POSTGRES_DB: typelizer_test_app_test | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| ports: | |
| - 5432:5432 | |
| runs-on: ubuntu-latest | |
| name: Ruby ${{ matrix.ruby }} | |
| env: | |
| BUNDLE_JOBS: 4 | |
| BUNDLE_RETRY: 3 | |
| DATABASE_URL: postgres://postgres:postgres@localhost:5432/typelizer_test_app_test | |
| strategy: | |
| matrix: | |
| ruby: | |
| - "4.0" | |
| - "3.4" | |
| - "3.3" | |
| - "3.2" | |
| - "3.1" | |
| - "3.0" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true | |
| bundler: latest | |
| # Drop once the issue is fixed: | |
| # https://github.com/actions/runner-images/issues/13647 | |
| - name: Fix gem directory permissions | |
| run: sudo chmod +t $(ruby -e 'puts Gem.default_dir')/gems | |
| - name: Setup dummy database | |
| run: spec/app/bin/setup | |
| - name: Run tests | |
| run: bundle exec rspec |