-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (46 loc) · 1.36 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
name: Unit and integration Tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '16.x'
- uses: nevermined-io/[email protected]
with:
token: ${{ secrets.API_TOKEN_GITHUB }}
node: 'false'
marketplace: 'false'
- name: Install dependencies
run: |
yarn
- name: Check lint
run: yarn lint
- name: Check formatting
run: yarn format:check
- name: Compile
run: yarn build
- name: Running elasticsearch
run: |
docker run \
-p 9200:9200 \
-p 9300:9300 \
-e "discovery.type=single-node" \
-e "bootstrap.memory_lock=true" \
-e "ELASTIC_PASSWORD=password"\
--name es01 \
-e "xpack.security.enabled=false" \
-d docker.elastic.co/elasticsearch/elasticsearch:8.8.1
- name: Wait for Elasticsearch
run: |
until curl --output /dev/null --silent --head --fail http://localhost:9200; do
echo "Waiting for Elasticsearch..."
sleep 5
done
- name: Run tests
run: |
yarn setup:dev
# HDWalletProvider keeps jest from exiting
yarn test:cov --forceExit