diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ac470da8..9b686227 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,8 +4,21 @@ on: branches: - master pull_request: + types: [opened, reopened, synchronize] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: jobs: + # Since the name of the matrix job depends on the version, we define another job with a more stable name. + test_results: + if: ${{ always() }} + runs-on: ubuntu-latest + name: Test Results + needs: [test-ubuntu-ruby] + steps: + - run: | + result="${{ needs.test.result }}" + exit [[ $result == "success" || $result == "skipped" ]] test-ubuntu-ruby: runs-on: ubuntu-latest services: @@ -27,8 +40,8 @@ jobs: strategy: fail-fast: false matrix: - # ruby-lang.org/en/downloads/branches - ruby: [ruby-head, "3.3", "3.2", "3.1"] + # https://ruby-lang.org/en/downloads/branches + ruby: ["3.3", "3.2", "3.1"] # https://www.postgresql.org/support/versioning/ pg: [12-master, 13-master, 14-master, 15-master, 16-master] steps: @@ -49,4 +62,5 @@ jobs: run: bundle exec rake test env: PGHOST: localhost + PGUSER: postgres PGPASSWORD: postgres diff --git a/Rakefile b/Rakefile index d488078a..7e9a1f10 100644 --- a/Rakefile +++ b/Rakefile @@ -3,7 +3,7 @@ require "rake/testtask" require_relative "test/rake_helper" task default: [:test] -task test: "test:postgis" +task test: "test:all" Rake::TestTask.new(:test_postgis) do |t| t.libs << postgis_test_load_paths