Merge pull request #101 from skalenetwork/ticket-98-TypeScript-less-any #708
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: Build and test | |
on: | |
push: | |
branches-ignore: | |
- 'docs-v*' | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: INIT - install Node JS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- uses: oven-sh/setup-bun@v1 | |
- name: INIT - install utilities | |
run: | | |
sudo apt-get install -y jq sed | |
npm install -g eslint | |
eslint --version | |
- name: Install all NPMs at root | |
run: | | |
yarn install | |
ls -1 | |
- name: JS Lint Check src | |
run: | | |
yarn run lint-check | |
echo "Looks like no JS code formatting errors so far)" | |
- name: JS Lint Check network-browser | |
run: | | |
yarn run lint-nb | |
- name: Install all NPMs in src | |
working-directory: ./src | |
run: | | |
yarn install | |
- name: INIT - build IMA | |
working-directory: ./src | |
run: | | |
yarn rebuild | |
- name: Compile contracts | |
working-directory: ./IMA/proxy | |
run: | | |
yarn install | |
- name: Install all NPMs in test | |
working-directory: ./test | |
run: | | |
yarn install | |
- name: Start background ganache | |
working-directory: ./IMA/proxy | |
run: | | |
npx ganache --miner.blockGasLimit 12000000 --logging.quiet --chain.allowUnlimitedContractSize --wallet.defaultBalance 2000000 --wallet.accountKeysPath ../../test/accounts.json & | |
sleep 3 | |
echo "Content of \"accounts.json\" is:" | |
cat ../../test/accounts.json | jq | |
- name: Run test (JS part) | |
working-directory: ./test | |
run: | | |
export NO_ANSI_COLORS=1 | |
yarn test | |
- name: Prepare test (PY part) | |
working-directory: ./test | |
run: | | |
python3 ../scripts/config_from_accounts.py accounts.json config.json | |
echo "Content of \"config.json\" is:" | |
cat config.json | jq | |
export PRIVATE_KEY_FOR_ETHEREUM=$( cat config.json | jq -M .PRIVATE_KEY_FOR_ETHEREUM | tr -d '"' | sed -e "s/^0x//" ) | |
echo "Value of \"PRIVATE_KEY_FOR_ETHEREUM\" is" $PRIVATE_KEY_FOR_ETHEREUM | |
export PRIVATE_KEY_FOR_SCHAIN=$( cat config.json | jq -M .PRIVATE_KEY_FOR_SCHAIN | tr -d '"' | sed -e "s/^0x//" ) | |
echo "Value of \"PRIVATE_KEY_FOR_SCHAIN\" is" $PRIVATE_KEY_FOR_SCHAIN | |
pip3 install -r requirements.txt | |
- name: Run test (PY part) | |
working-directory: ./test | |
run: | | |
export URL_W3_ETHEREUM="http://127.0.0.1:8545" | |
export URL_W3_S_CHAIN="http://127.0.0.1:8545" | |
export NO_ANSI_COLORS=1 | |
python3 test.py |