-
Notifications
You must be signed in to change notification settings - Fork 38
67 lines (64 loc) · 2.15 KB
/
pytest.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
##
## Copyright 2021 Ocean Protocol Foundation
## SPDX-License-Identifier: Apache-2.0
##
name: Provider tests
on:
- push
- pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup Provider
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: '3.8'
- uses: actions/checkout@v2
name: Checkout Barge
with:
repository: "oceanprotocol/barge"
path: 'barge'
ref: v4
- name: Run Barge
working-directory: ${{ github.workspace }}/barge
env:
OPERATOR_SERVICE_VERSION: refactor_signatures
CONTRACTS_VERSION: v1.0.0-alpha.28
AQUARIUS_VERSION: refactor_signatures
PROVIDER_VERSION: refactor_signatures
run: |
bash -x start_ocean.sh --no-dashboard 2>&1 --with-rbac --with-provider2 --with-c2d > start_ocean.log &
for i in $(seq 1 150); do
sleep 5
[ -f "$HOME/.ocean/ocean-contracts/artifacts/ready" -a -f "$HOME/.ocean/ocean/c2d/ready" ] && break
done
ls -la "$HOME/.ocean/ocean-contracts/artifacts/"
- name: Install dependencies
working-directory: ${{ github.workspace }}
run: |
python -m pip install --upgrade pip
pip install -r requirements_dev.txt
- name: Test with pytest
run: |
coverage run --source ocean_provider -m pytest
coverage report
coverage xml
- name: docker logs
run: docker logs ocean_aquarius_1 && docker logs ocean_provider_1 && docker logs ocean_provider2_1 && docker logs ocean_computetodata_1
if: ${{ failure() }}
- name: Publish code coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: b0d75c25d5176c59e8ea665bf74396d9ee1bdf2c97f11ccc6869f9e91d80a6c7
dockerbuild:
runs-on: ubuntu-latest
needs: [build]
if: ${{ success() && github.event_name == 'pull_request'}}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: docker build -t "testimage:latest" .