Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pytest sync, update workflows #571

Merged
merged 13 commits into from
Mar 16, 2023
Merged
115 changes: 60 additions & 55 deletions .github/workflows/komodo_linux_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,46 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install deps (Linux)

env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update # prevents repo404 errors on apt-remove below
sudo apt-get remove php* msodbcsql17 mysql* powershell dotn*
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get upgrade -y
sudo apt-get install -q \
curl \
python3 \
python3-dev \
python3-setuptools \
python3-pip \
libcurl4-openssl-dev \
libssl-dev -y
python3 -m pip install setuptools wheel
python3 -m pip install pytest wget jsonschema
python3 -m pip install -Iv https://github.com/KomodoPlatform/slick-bitcoinrpc/archive/refs/tags/0.1.4.tar.gz
build-essential \
pkg-config \
libc6-dev \
m4 \
g++-multilib \
autoconf \
libtool \
ncurses-dev \
unzip \
git \
python3 \
python3-zmq \
zlib1g-dev \
wget \
libcurl4-gnutls-dev \
bsdmainutils \
automake \
curl \
cmake \
mingw-w64 \
libsodium-dev \
libevent-dev -y

- name: Build (Linux)
run: |
# flag for some CC tests transactions - so DO NOT USE THIS CI ARTIFACTS IN PRODUCTION!!!
CONFIGURE_FLAGS='CPPFLAGS=-DTESTMODE' ./zcutil/build.sh -j$(nproc)
tar -czvf komodo-linux.tar.gz src/komodod src/komodo-cli

- name: Upload komodo-linux.tar.gz as artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: komodo-linux
path: ./komodo-linux.tar.gz
Expand All @@ -53,7 +64,7 @@ jobs:
needs: linux-build

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install deps (Dice, Token, Faucet, Rewards CC)
run: |
Expand All @@ -63,33 +74,32 @@ jobs:
python3 \
python3-dev \
python3-setuptools \
python3-pip \
libcurl4-openssl-dev \
libssl-dev -y
python3 -m pip install setuptools wheel
python3-pip
python3 -m pip install wheel
python3 -m pip install pytest wget jsonschema
python3 -m pip install -Iv https://github.com/KomodoPlatform/slick-bitcoinrpc/archive/refs/tags/0.1.4.tar.gz
python3 -m pip install requests ujson

- name: Download komodo-linux.tar.gz
uses: actions/download-artifact@v1
uses: actions/download-artifact@v3
with:
name: komodo-linux

- name: Test CC (Linux)
run: |
mv komodo-linux/komodo-linux.tar.gz .
mkdir -p src
tar xzvf komodo-linux.tar.gz
./zcutil/fetch-params.sh
cd qa/pytest_komodo
./ci_setup.sh "cc_modules/test_dice.py cc_modules/test_faucet.py cc_modules/test_token.py cc_modules/test_rewards.py"

linux-test-oracles:

name: Test (Linux/OraclesCC)
runs-on: ubuntu-latest
needs: linux-build

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install deps (OraclesCC)
run: |
Expand All @@ -99,33 +109,32 @@ jobs:
python3 \
python3-dev \
python3-setuptools \
python3-pip \
libcurl4-openssl-dev \
libssl-dev -y
python3 -m pip install setuptools wheel
python3-pip
python3 -m pip install wheel
python3 -m pip install pytest wget jsonschema
python3 -m pip install -Iv https://github.com/KomodoPlatform/slick-bitcoinrpc/archive/refs/tags/0.1.4.tar.gz
python3 -m pip install requests ujson

- name: Download komodo-linux.tar.gz
uses: actions/download-artifact@v1
uses: actions/download-artifact@v3
with:
name: komodo-linux

- name: Oracles Test (Linux)
run: |
mv komodo-linux/komodo-linux.tar.gz .
mkdir -p src
tar xzvf komodo-linux.tar.gz
./zcutil/fetch-params.sh
cd qa/pytest_komodo
./ci_setup.sh cc_modules/test_oracles.py

linux-test-baserpc:

name: Test (Linux/BasicRPC)
runs-on: ubuntu-latest
needs: linux-build

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install deps (BasicRPC)
run: |
Expand All @@ -135,33 +144,32 @@ jobs:
python3 \
python3-dev \
python3-setuptools \
python3-pip \
libcurl4-openssl-dev \
libssl-dev -y
python3 -m pip install setuptools wheel
python3-pip
python3 -m pip install wheel
python3 -m pip install pytest wget jsonschema
python3 -m pip install -Iv https://github.com/KomodoPlatform/slick-bitcoinrpc/archive/refs/tags/0.1.4.tar.gz
python3 -m pip install requests ujson

- name: Download komodo-linux.tar.gz
uses: actions/download-artifact@v1
uses: actions/download-artifact@v3
with:
name: komodo-linux

- name: BasicRPC Test (Linux)
run: |
mv komodo-linux/komodo-linux.tar.gz .
mkdir -p src
tar xzvf komodo-linux.tar.gz
./zcutil/fetch-params.sh
cd qa/pytest_komodo
./ci_setup.sh basic

linux-test-channels:

name: Test (Linux/ChannelsCC)
runs-on: ubuntu-latest
needs: linux-build

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install deps (ChannelsCC)
run: |
Expand All @@ -171,33 +179,32 @@ jobs:
python3 \
python3-dev \
python3-setuptools \
python3-pip \
libcurl4-openssl-dev \
libssl-dev -y
python3 -m pip install setuptools wheel
python3-pip
python3 -m pip install wheel
python3 -m pip install pytest wget jsonschema
python3 -m pip install -Iv https://github.com/KomodoPlatform/slick-bitcoinrpc/archive/refs/tags/0.1.4.tar.gz
python3 -m pip install requests ujson

- name: Download komodo-linux.tar.gz
uses: actions/download-artifact@v1
uses: actions/download-artifact@v3
with:
name: komodo-linux

- name: Channels Test (Linux)
run: |
mv komodo-linux/komodo-linux.tar.gz .
mkdir -p src
tar xzvf komodo-linux.tar.gz
./zcutil/fetch-params.sh
cd qa/pytest_komodo
./ci_setup.sh cc_modules/test_channels.py

linux-test-heir:

name: Test (Linux/HeirCC)
runs-on: ubuntu-latest
needs: linux-build

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install deps (HeirCC)
run: |
Expand All @@ -207,20 +214,18 @@ jobs:
python3 \
python3-dev \
python3-setuptools \
python3-pip \
libcurl4-openssl-dev \
libssl-dev -y
python3 -m pip install setuptools wheel
python3-pip
python3 -m pip install wheel
python3 -m pip install pytest wget jsonschema
python3 -m pip install -Iv https://github.com/KomodoPlatform/slick-bitcoinrpc/archive/refs/tags/0.1.4.tar.gz
python3 -m pip install requests ujson

- name: Download komodo-linux.tar.gz
uses: actions/download-artifact@v1
uses: actions/download-artifact@v3
with:
name: komodo-linux

- name: Heir Test (Linux)
run: |
mv komodo-linux/komodo-linux.tar.gz .
mkdir -p src
tar xzvf komodo-linux.tar.gz
./zcutil/fetch-params.sh
Expand Down
38 changes: 21 additions & 17 deletions .github/workflows/komodo_mac_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install deps (macOS)
run: |
Expand All @@ -37,7 +37,7 @@ jobs:
tar -czvf komodo-macos.tar.gz src/komodod src/komodo-cli

- name: Upload komodo-macos.tar.gz as artifact
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: komodo-macos
path: ./komodo-macos.tar.gz
Expand All @@ -49,16 +49,16 @@ jobs:
needs: macos-build

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install deps (Dice, Token, Faucet, Rewards CC)
run: |
brew install python3 curl
python3 -m pip install setuptools wheel
python3 -m pip install slick-bitcoinrpc pytest wget jsonschema
python3 -m pip install requests pytest wget jsonschema ujson

- name: Download komodo-macos.tar.gz
uses: actions/download-artifact@v1
uses: actions/download-artifact@v3
with:
name: komodo-macos

Expand All @@ -78,15 +78,16 @@ jobs:
needs: macos-build

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install deps (OraclesCC)
run: |
brew install python3 curl
python3 -m pip install setuptools wheel
python3 -m pip install slick-bitcoinrpc pytest wget jsonschema
python3 -m pip install requests pytest wget jsonschema ujson

- name: Download komodo-macos.tar.gz
uses: actions/download-artifact@v1
uses: actions/download-artifact@v3
with:
name: komodo-macos

Expand All @@ -106,15 +107,16 @@ jobs:
needs: macos-build

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install deps (BasicRPC)
run: |
brew install python3 curl
python3 -m pip install setuptools wheel
python3 -m pip install slick-bitcoinrpc pytest wget jsonschema
python3 -m pip install requests pytest wget jsonschema ujson

- name: Download komodo-macos.tar.gz
uses: actions/download-artifact@v1
uses: actions/download-artifact@v3
with:
name: komodo-macos

Expand All @@ -134,15 +136,16 @@ jobs:
needs: macos-build

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install deps (ChannelsCC)
run: |
brew install python3 curl
python3 -m pip install setuptools wheel
python3 -m pip install slick-bitcoinrpc pytest wget jsonschema
python3 -m pip install requests pytest wget jsonschema ujson

- name: Download komodo-macos.tar.gz
uses: actions/download-artifact@v1
uses: actions/download-artifact@v3
with:
name: komodo-macos

Expand All @@ -162,15 +165,16 @@ jobs:
needs: macos-build

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install deps (HeirCC)
run: |
brew install python3 curl
python3 -m pip install setuptools wheel
python3 -m pip install slick-bitcoinrpc pytest wget jsonschema
python3 -m pip install requests pytest wget jsonschema ujson

- name: Download komodo-macos.tar.gz
uses: actions/download-artifact@v1
uses: actions/download-artifact@v3
with:
name: komodo-macos

Expand Down
Loading