Repository navigation
Bump github/codeql-action from 4.37.3 to 4.38.2 #32
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
| # install dependencies and run tests | |
| # https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby | |
| name: Ruby | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| # Every supported Ruby, each with the newest ActiveRecord that Ruby can run, against SQLite (yaml and json columns). | |
| # JRuby is not in the matrix: the test suite needs the sqlite3 gem, which is a C extension JRuby cannot load. | |
| test_matrix: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu | |
| - macos | |
| ruby: | |
| - 2.5 | |
| - 2.6 | |
| - 2.7 | |
| - "3.0" | |
| - 3.1 | |
| - 3.2 | |
| - 3.3 | |
| - "3.4" | |
| - "4.0" | |
| - head | |
| - truffleruby | |
| - truffleruby-head | |
| exclude: | |
| - { os: macos, ruby: 2.5 } # ruby/setup-ruby has no CRuby < 2.6 build for the arm64 macos-latest runner | |
| runs-on: ${{ matrix.os }}-latest | |
| steps: | |
| - name: clone ${{ github.repository }} | |
| uses: actions/checkout@v7 | |
| - name: setup Ruby ${{ matrix.ruby }} | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true | |
| - name: Run tests | |
| run: bundle exec rake | |
| # Every supported ActiveRecord version, against SQLite and MySQL (yaml and json columns) and PostgreSQL (yaml, json, jsonb and hstore columns). | |
| # RAILS_VERSION and DB are read by the Gemfile and spec/spec_helper.rb; `include` picks a Ruby each Rails version supports. | |
| rails_matrix: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| rails: ["6.1", "7.0", "7.1", "7.2", "8.0", "8.1"] | |
| db: [sqlite3, postgresql, mysql] | |
| include: | |
| - { rails: "6.1", ruby: "3.0" } | |
| - { rails: "7.0", ruby: "3.2" } | |
| - { rails: "7.1", ruby: "3.4" } | |
| - { rails: "7.2", ruby: "3.4" } | |
| - { rails: "8.0", ruby: "3.4" } | |
| - { rails: "8.1", ruby: "3.4" } | |
| runs-on: ubuntu-latest | |
| environment: test # CODECOV_TOKEN is a secret of the GitHub environment "test"; without this line secrets.CODECOV_TOKEN is empty | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: embedded_localization_test | |
| ports: | |
| - 5432:5432 | |
| options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
| mysql: | |
| image: mysql:8 | |
| env: | |
| MYSQL_ROOT_PASSWORD: root | |
| MYSQL_DATABASE: embedded_localization_test | |
| ports: | |
| - 3306:3306 | |
| options: --health-cmd "mysqladmin ping -h 127.0.0.1 -uroot -proot" --health-interval 10s --health-timeout 5s --health-retries 10 | |
| env: | |
| RAILS_VERSION: ${{ matrix.rails }} | |
| DB: ${{ matrix.db }} | |
| PGHOST: localhost | |
| PGUSER: postgres | |
| PGPASSWORD: postgres | |
| MYSQL_HOST: 127.0.0.1 | |
| MYSQL_USER: root | |
| MYSQL_PASSWORD: root | |
| steps: | |
| - name: clone ${{ github.repository }} | |
| uses: actions/checkout@v7 | |
| - name: install the MySQL client library (needed to build the mysql2 gem) | |
| if: matrix.db == 'mysql' | |
| run: sudo apt-get update -qq && sudo apt-get install -y -qq libmysqlclient-dev | |
| - name: setup Ruby ${{ matrix.ruby }} | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true | |
| - name: Run tests | |
| run: bundle exec rake | |
| - name: Upload coverage to Codecov | |
| if: matrix.db == 'postgresql' && matrix.rails == '8.1' # the PostgreSQL run covers the jsonb and hstore code paths too | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: coverage/.resultset.json | |
| fail_ci_if_error: false | |
| finish: | |
| runs-on: ubuntu-latest | |
| needs: [ test_matrix, rails_matrix ] | |
| steps: | |
| - name: Wait for status checks | |
| run: echo "All Green!" |