-
Notifications
You must be signed in to change notification settings - Fork 7
50 lines (50 loc) · 1.39 KB
/
redis_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Redis Test Task
on:
workflow_dispatch:
inputs:
redis_install_mode:
description: Select the Redis Install mode
required: true
default: gha
type: choice
options:
- gha
- aptget
jobs:
redis-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f #ref v2
- name: Install redis Github action
if: ${{ github.event.inputs.redis_install_mode == 'gha' }}
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: "7.x"
- name: Install Redis using apt-get
if: ${{ github.event.inputs.redis_install_mode == 'aptget' }}
run: |
sudo apt-get update
sudo apt-get install -y redis-tools redis-server
- name: Install net tools
run: |
sudo apt-get update
sudo apt-get install -y net-tools
- name: Install node
uses: actions/setup-node@v4
with:
node-version: '18.14.2'
cache: 'npm'
- name: Verify that redis is up
run: |
sudo netstat -plnt | grep 6379
redis-cli -v
redis-cli ping
- name: Install
run: npm ci
- name: Build
run: npm run build
- name: test redis app
run: |
cd .github/scripts/redis_test
npm ci
node index.js