-
Notifications
You must be signed in to change notification settings - Fork 14
90 lines (80 loc) · 2.27 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Test
on:
push:
branches-ignore:
- develop
- main
- master
- stage
pull_request:
branches:
- develop
jobs:
build_and_test:
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- 6379:6379
ipfs:
image: ipfs/go-ipfs:v0.14.0
ports:
- 5001:5001
stripe:
image: stripemock/stripe-mock:latest
ports:
- 12111:12111
- 12112:12112
postgres:
image: postgres:12-alpine
ports:
- 5432:5432
env:
POSTGRES_DB: matters-test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Cache NPM dependencies
uses: actions/cache@v3
id: node_modules_cache
with:
path: node_modules
key: ${{ runner.os }}-v18-npm-v3-${{ hashFiles('package-lock.json') }}
- name: Install Dependencies
if: steps.node_modules_cache.outputs.cache-hit != 'true'
run: npm ci
- name: Lint
run: |
npm run lint \
&& npm run format:check
- name: Test
run: npm run test
env:
NODE_OPTIONS: '--no-experimental-fetch'
CODECOV_TOKEN: de5ab681-0837-4a24-b614-0a29225a7e4c
MATTERS_ENV: test
MATTERS_LOGGING_LEVEL: critical
MATTERS_PG_HOST: localhost
MATTERS_PG_USER: postgres
MATTERS_PG_PASSWORD: postgres
MATTERS_PG_DATABASE: matters-test
MATTERS_QUEUE_HOST: localhost
MATTERS_CACHE_HOST: localhost
MATTERS_MATTY_ID: 6
MATTERS_JWT_SECRET: QsNmu9
MATTERS_ELASTICSEARCH_HOST: localhost
MATTERS_ELASTICSEARCH_PORT: 9200
MATTERS_IPFS_SERVERS: 'http://localhost:5001'
MATTERS_OICD_PRIVATE_KEY: .ebextensions/oicd_rsa_private_local.pem
MATTERS_STRIPE_SECRET: sk_test_foobar
MATTERS_SENDGRID_API_KEY: SG.0-_abcabcabc.
MATTERS_OPENSEA_API_BASE: 'https://rinkeby-api.opensea.io/api/v1'
- name: Build
run: npm run build