Go to file
Marcus Pöhls 648214f09d formatting 2021-12-28 06:53:01 +01:00
.github/workflows second try 2021-01-08 11:01:26 +01:00
CHANGELOG.md update changelog 2021-12-27 06:42:25 +01:00
Dockerfile no new line 2019-12-18 10:54:17 +01:00
LICENSE Initial commit 2019-12-17 13:26:53 +01:00
README.md support custom port 2021-12-27 06:41:35 +01:00
action.yml formatting 2021-12-28 06:53:01 +01:00
start-redis.sh support custom port 2021-12-27 06:41:35 +01:00

README.md



Redis in GitHub Actions

Start a Redis server in your GitHub Actions.


Usage



Follow @marcuspoehls and @superchargejs for updates!


Introduction

This GitHub Action starts a Redis server on the default port 6379.

This is useful when running tests against a Redis database.

Usage

A code example says more than a 1000 words. Heres an exemplary GitHub Action using a Redis server in versions 4 and 5 to test a Node.js app:

name: Run tests

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [10.x, 12.x, 14.x]
        redis-version: [4, 5, 6]

    steps:
    - name: Git checkout
      uses: actions/checkout@v2

    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}

    - name: Start Redis
      uses: supercharge/redis-github-action@1.3.0
      with:
        redis-version: ${{ matrix.redis-version }}

    - run: npm install

    - run: npm test
      env:
        CI: true

Using Redis on a Custom Port

You can start the Redis instance on a custom port using the redis-port input:

name: Run tests

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [14.x, 16.x]
        redis-version: [4, 5, 6]

    steps:
    - name: Start Redis
      uses: supercharge/redis-github-action@1.3.0
      with:
        redis-version: ${{ matrix.redis-version }}
        redis-port: 12345

    - name: 

License

MIT © Supercharge


superchargejs.com  ·  GitHub @supercharge  ·  Twitter @superchargejs