-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (56 loc) · 1.9 KB
/
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
51
52
53
54
55
56
57
58
59
60
61
name: PostgreSQL service example
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x'
cache: 'npm'
- run: npm ci
- run: npm run build
testing:
runs-on: ubuntu-latest
# Service containers to run with `testing`
services:
# Label used to access the service container
db:
# Docker Hub image
image: mysql
ports:
- '3306:3306'
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_USER: athenauser
MYSQL_PASSWORD: password
MYSQL_DATABASE: athena_test
options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 10
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x'
cache: 'npm'
- run: npm ci
- name: Connect to PostgreSQL
# Runs a script that creates a PostgreSQL table, populates
# the table with data, and then retrieves the data.
run: npm run test:ci
# Environment variables used by the `client.js` script to create a new PostgreSQL table.
env:
# The hostname used to communicate with the PostgreSQL service container
# The default PostgreSQL port
ATHENA_DB_USER: athenauser
ATHENA_DB_HOST: localhost
ATHENA_DB_PORT: 3306
ATHENA_DB_PASSWORD: password
AZURE_SPEECH_REGION: westeurope
AZURE_SPEECH_KEY: ${{ secrets.AZURE_SPEECH_KEY }}
ATHENA_CLIENT_EMAIL: ${{ secrets.ATHENA_CLIENT_EMAIL }}
GCP_BUCKET_NAME: ${{ secrets.GCP_BUCKET_NAME }}
ATHENA_PROJECT_ID: ${{ secrets.ATHENA_PROJECT_ID }}
ATHENA_PRIVATE_KEY: ${{ secrets.ATHENA_PRIVATE_KEY }}