-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnode-testing-with-dbs-workflow.yaml
More file actions
49 lines (49 loc) · 1.34 KB
/
node-testing-with-dbs-workflow.yaml
File metadata and controls
49 lines (49 loc) · 1.34 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
name: Node testing with DB and Redis workflow
on:
workflow_call:
secrets:
NPM_TOKEN:
required: true
inputs:
node_v:
type: string
required: false
default: "12.14.1"
env:
## Sets environment variable
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_OPTIONS: "--max-old-space-size=4096"
HUSKY: 0
jobs:
testing:
# The type of runner that the job will run on
# Containers must run in Linux based operating systems
runs-on: app_backend_ulatest
container: node:${{ inputs.node_v }}
# Service containers to add`
services:
# Label used to access the service container
redis:
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
mysql:
image: mysql:5.7
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: "1234"
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Testing
uses: totango/shared-github-actions/.github/actions/testing@main
id: image
with:
node_v: ${{ inputs.node_v }}
npm_token: ${{ secrets.NPM_TOKEN }}
db_url: mysql
redis_url: redis