diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 088dc65..be85e0a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,6 +16,8 @@ jobs: build: runs-on: ubuntu-latest + name: ${{ matrix.redmine-repository }} ${{ matrix.redmine-version }} ${{ matrix.redmine-database }} + strategy: matrix: include: @@ -28,7 +30,7 @@ jobs: - redmine-repository: 'redmica/redmica' redmine-version: 'stable-2.4' - redmine-database: 'postgresql' + redmine-database: 'postgres:14' ruby-version: '3.2' expected-about-db-adapter: 'PostgreSQL' expected-about-redmine-version: '2\.4\.[0-9]\.stable' diff --git a/README.md b/README.md index 5842b16..87eb50b 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,8 @@ This action installs Redmine and sets up an environment to run tests. It is prim # The branch, tag or commit to checkout. Default is master. version: 'master' - # Database to use for testing. Available values are sqlite3, postgresql. Default is sqlite3. + # Database to use for testing. Available values are sqlite3 or + # an official PostgreSQL image tag such as postgres:14. Default is sqlite3. database: 'sqlite3' # Ruby version to use for testing. See ruby/setup-ruby's ruby-version input for available versions. @@ -36,7 +37,7 @@ See also [action.yml](./action.yml). with: repository: 'redmica/redmica' version: 'v2.4.2' - database: 'postgresql' + database: 'postgres:14' ruby-version: '3.2' ``` diff --git a/action.yml b/action.yml index 506d847..ec9c6e2 100644 --- a/action.yml +++ b/action.yml @@ -15,7 +15,7 @@ inputs: required: true default: 'master' database: - description: 'Database to use for testing. Available values are sqlite3, postgresql. Default is sqlite3.' + description: 'Database to use for testing. Available values are sqlite3 or an official PostgreSQL image tag such as postgres:14. Default is sqlite3.' required: true default: 'sqlite3' ruby-version: @@ -73,7 +73,7 @@ runs: shell: bash - name: Set up PostgreSQL database connection for testing - if: ${{ inputs.database == 'postgresql' }} + if: ${{ startsWith(inputs.database, 'postgres:') }} run: | sudo apt-get install -y --no-install-recommends libpq-dev @@ -81,7 +81,7 @@ runs: --name redmine-postgres \ -e POSTGRES_PASSWORD=postgres \ -p 5432:5432 \ - -d postgres:14 + -d ${{ inputs.database }} cat < config/database.yml test: