Skip to content

Commit

Permalink
Wrote a description in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hidakatsuya committed May 13, 2024
1 parent 15b4703 commit 776af71
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 4 deletions.
66 changes: 66 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,69 @@
# Setup Redmine

[![Build](https://github.com/hidakatsuya/action-setup-redmine/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/hidakatsuya/action-setup-redmine/actions/workflows/build.yml)

This GitHub Action installs Redmine and sets up an environment to run tests. It is primarily aimed at providing an environment to run tests for Redmine plugins.

## Usage

```yaml
- uses: hidakatsuya/action-setup-redmine@v1
with:
# Redmine repository to setup. Default is redmine/redmine.
repository: 'redmine/redmine'

# 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.
databae: 'sqlite3'

# Ruby version to use for testing. See ruby/setup-ruby's ruby-version input for available versions.
ruby-version: ''

# Directory to setup Redmine. Default is the current directory.
path: '.'
```
See also [action.yml](./action.yml).
## Example
### Setting up [RedMica](https://github.com/redmica/redmica)
```yaml
- uses: hidakatsuya/action-setup-redmine@v1
with:
repository: 'redmica/redmica'
version: 'v2.4.2'
database: 'postgresql'
ruby-version: '3.2'
```
### Run a test for the Redmine plugin
For example, you are developing the `redmine_hello_world` plugin on GitHub repository. To run a test for that plugin in GitHub Action, do the following:

```yaml
- uses: hidakatsuya/action-setup-redmine@v1
with:
ruby-version: '3.3'
- uses: action/checkout@v4
with:
path: plugins/redmine_hello_world
- run: |
bundle install
bin/rails redmine:plugins:test NAME=redmine_hello_world
```

## Versioning

This action follows [the recommendations of GitHub Actions Versioning](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md).

## Releasing

1. Make sure CI for main branch has passed
2. Create a new release to publish to the GitHub Marketplace
3. Make sure that the release workflow has passed
8 changes: 4 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ author: hidakatsuya

inputs:
repository:
description: 'Redmine repository to setup.'
description: 'Redmine repository to setup. Default is redmine/redmine.'
required: true
default: 'redmine/redmine'
version:
description: 'The branch, tag or SHEA of the repository to setup.'
description: 'The branch, tag or commit to checkout. Default is master.'
required: true
default: 'master'
database:
description: 'Database to use for testing. Available values are sqlite3, postgresql.'
description: 'Database to use for testing. Available values are sqlite3, postgresql. Default is sqlite3.'
required: true
default: 'sqlite3'
ruby-version:
description: "Ruby version to use for testing. See ruby/setup-ruby's ruby-version input for available versions."
required: true
path:
description: 'Directory to setup Redmine.'
description: 'Directory to setup Redmine. Default is the current directory.'
required: true
default: '.'

Expand Down

0 comments on commit 776af71

Please sign in to comment.