forked from bigbluebutton/bbb-webhooks
-
Notifications
You must be signed in to change notification settings - Fork 3
52 lines (47 loc) · 1.71 KB
/
docker-tests.yml
File metadata and controls
52 lines (47 loc) · 1.71 KB
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
51
52
name: Run tests
on:
workflow_dispatch:
workflow_call:
permissions:
contents: read
jobs:
tests:
name: Run tests
# https://docs.github.com/en/actions/using-containerized-services/creating-redis-service-containers#running-jobs-in-containers
# Containers must run in Linux based operating systems
runs-on: ubuntu-22.04
# Docker Hub image that `container-job` executes in
container: node:20-alpine
# Service containers to run with `container-job`
services:
# Label used to access the service container
redis:
# Docker Hub image
image: redis
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
# Downloads a copy of the code in your repository before running CI tests
- name: Check out repository code
uses: actions/checkout@v4
# Performs a clean installation of all dependencies in the `package.json` file
# For more information, see https://docs.npmjs.com/cli/ci.html
- name: Install dependencies
run: npm ci
- name: Copy config
run: cp config/default.example.yml config/default.yml
- name: Run tests
# Runs a script that creates a Redis client, populates
# the client with data, and retrieves data
run: npm run test
# Environment variable used by the `client.js` script to create a new Redis client.
env:
# The hostname used to communicate with the Redis service container
REDIS_HOST: redis
# The default Redis port
REDIS_PORT: 6379
XAPI_ENABLED: true