Skip to content

Upgrade to cadence 1.0 #127

Upgrade to cadence 1.0

Upgrade to cadence 1.0 #127

Workflow file for this run

name: CI
on:
push:
branches:
- master
paths-ignore:
- 'docs/**'
pull_request:
branches:
- master
paths-ignore:
- 'docs/**'
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Setup Poetry
uses: abatilo/[email protected]
- name: Poetry - Cache
id: poetry-cache
uses: actions/cache@v2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
- name: Poetry - Install
if: steps.poetry-cache.outputs.cache-hit != 'true'
run: poetry install
- name: Poetry - black check
run: poetry run black . --check
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Setup Poetry
uses: abatilo/[email protected]
- name: Poetry - Cache
id: poetry-cache
uses: actions/cache@v2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
- name: Poetry - Install
if: steps.poetry-cache.outputs.cache-hit != 'true'
run: poetry install
- name: Poetry - pytest
run: poetry run pytest
codecov:
name: Code Coverage Report
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Setup Poetry
uses: abatilo/[email protected]
- name: Poetry - Cache
id: poetry-cache
uses: actions/cache@v2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
- name: Poetry - Install
if: steps.poetry-cache.outputs.cache-hit != 'true'
run: poetry install
- name: Poetry - coverage report
run: poetry run coverage run -m pytest && poetry run coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
fail_ci_if_error: true
path_to_write_report: ./coverage/codecov_report.txt
verbose: true
integration-test:
name: Emulator Integration Tests
runs-on: ubuntu-latest
needs: test
services:
emulator:
#image: gcr.io/flow-container-registry/emulator:latest
# temporarily changed because the latest emulator is not 1.0
image: gcr.io/flow-container-registry/emulator:v1.0.0-preview.38
ports:
- 3569:3569
env:
# FLOW_TRANSACTIONFEESENABLED: true
FLOW_VERBOSE: true
FLOW_SERVICEPRIVATEKEY: 39a162b7ea58314c2cda19f32020b3992e9017a0acc5b3ac53ce3a3f8511a877
FLOW_SERVICEKEYSIGALGO: ECDSA_P256
FLOW_SERVICEKEYHASHALGO: SHA3_256
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Setup Poetry
uses: abatilo/[email protected]
- name: Poetry - Cache
id: poetry-cache
uses: actions/cache@v2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
- name: Poetry - Install
if: steps.poetry-cache.outputs.cache-hit != 'true'
run: poetry install
- name: Poetry - Examples
run: poetry run examples