Update dispense_predictoor_rose.yml #3549
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unit Testing and Code Coverage | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_call: | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
BINANCE_API_URL: ${{secrets.BINANCE_API_URL}} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python {{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/checkout@v2 | |
name: Checkout Barge | |
with: | |
repository: "oceanprotocol/barge" | |
path: "barge" | |
- name: Login to Docker Hub | |
if: ${{ env.DOCKERHUB_PASSWORD && env.DOCKERHUB_USERNAME }} | |
run: | | |
echo "Login to Docker Hub";echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin | |
env: | |
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} | |
- name: Run Barge | |
working-directory: ${{ github.workspace }}/barge | |
env: | |
SUBGRAPH_VERSION: main | |
GANACHE_FORK: london | |
run: | | |
bash -x start_ocean.sh --no-aquarius --no-elasticsearch --no-provider --no-dashboard --with-thegraph > start_ocean.log & | |
- name: Install dependencies | |
working-directory: ${{ github.workspace }} | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Set up Openzeppelin | |
run: npm install @openzeppelin/contracts | |
- name: Wait for contracts deployment | |
working-directory: ${{ github.workspace }}/barge | |
run: | | |
for i in $(seq 1 250); do | |
sleep 10 | |
[ -f "$HOME/.ocean/ocean-contracts/artifacts/ready" ] && break | |
done | |
- name: "Read address.json contents" | |
working-directory: ${{ github.workspace }} | |
run: cat "$HOME/.ocean/ocean-contracts/artifacts/address.json" | |
- name: Test | |
run: | | |
coverage run --omit="*test*" -m pytest | |
coverage report | |
coverage xml | |
env: | |
JUDGE_PRIVATE_KEY: ${{secrets.JUDGE_PRIVATE_KEY}} | |
- name: Publish code coverage | |
uses: paambaati/[email protected] | |
env: | |
CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}} |