-
Notifications
You must be signed in to change notification settings - Fork 54
80 lines (70 loc) · 2.88 KB
/
node.js.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
# This workflow will do a clean install of node dependencies and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
tags: [ ready-to-test ]
pull_request:
branches: [ master ]
env:
ACCOUNT_ADDRESS_TEST: ${{ secrets.ACCOUNT_ADDRESS_TEST }}
ACCOUNT_SECRET_TEST: ${{ secrets.ACCOUNT_SECRET_TEST }}
COINBASE_ENDPOINT: ${{ secrets.COINBASE_ENDPOINT }}
COMPOUND_ENDPOINT: ${{ secrets.COMPOUND_ENDPOINT }}
GAS_STATION_ENDPOINT: ${{ secrets.GAS_STATION_ENDPOINT }}
CB_ACCESS_KEY: ${{ secrets.CB_ACCESS_KEY }}
CB_ACCESS_PASSPHRASE: ${{ secrets.CB_ACCESS_PASSPHRASE }}
CB_ACCESS_SECRET: ${{ secrets.CB_ACCESS_SECRET }}
PROVIDER_IPC_PATH: ${{ secrets.PROVIDER_IPC_PATH }}
PROVIDER_INFURA_ID: ${{ secrets.PROVIDER_INFURA_ID }}
PROVIDER_INFURA_SECRET: ${{ secrets.PROVIDER_INFURA_SECRET }}
PROVIDER_ALCHEMY_KEY: ${{ secrets.PROVIDER_ALCHEMY_KEY }}
PGDATABASE: ${{ secrets.PGDATABASE }}
PGHOST: ${{ secrets.PGHOST }}
PGPASSWORD: ${{ secrets.PGPASSWORD }}
PGPORT: ${{ secrets.PGPORT }}
PGUSER: ${{ secrets.PGUSER }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
jobs:
Tests:
runs-on: [ self-hosted, psql-db-access ]
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Create .env file
run: |
touch .env
echo "ACCOUNT_ADDRESS_TEST="$ACCOUNT_ADDRESS_TEST >> .env
echo "ACCOUNT_SECRET_TEST"=$ACCOUNT_SECRET_TEST >> .env
echo "COINBASE_ENDPOINT"=$COINBASE_ENDPOINT >> .env
echo "COMPOUND_ENDPOINT"=$COMPOUND_ENDPOINT >> .env
echo "GAS_STATION_ENDPOINT"=$GAS_STATION_ENDPOINT >> .env
echo "CB_ACCESS_KEY"=$CB_ACCESS_KEY >> .env
echo "CB_ACCESS_PASSPHRASE"=$CB_ACCESS_PASSPHRASE >> .env
echo "CB_ACCESS_SECRET"=$CB_ACCESS_SECRET >> .env
echo "PROVIDER_IPC_PATH"=$PROVIDER_IPC_PATH >> .env
echo "PROVIDER_INFURA_ID"=$PROVIDER_INFURA_ID >> .env
echo "PROVIDER_INFURA_SECRET"=$PROVIDER_INFURA_SECRET >> .env
echo "PROVIDER_ALCHEMY_KEY"=$PROVIDER_ALCHEMY_KEY >> .env
echo "PGDATABASE"=$PGDATABASE >> .env
echo "PGHOST"=$PGHOST >> .env
echo "PGPASSWORD"=$PGPASSWORD >> .env
echo "PGPORT"=$PGPORT >> .env
echo "PGUSER"=$PGUSER >> .env
echo "SLACK_WEBHOOK"=$SLACK_WEBHOOK >> .env
cat .env
shell: bash
- name: Install dependencies
run: |
yarn install --ignore-optional
# The tfjs folks haven't published arm binaries yet
# yarn add @tensorflow/tfjs-node
# npm rebuild @tensorflow/tfjs-node --build-from-source
shell: bash
- run: yarn test