49 lines
1.8 KiB
YAML
49 lines
1.8 KiB
YAML
name: Validate Entity Package PR
|
|
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
validate_package_file_name:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
|
|
- name: Setup Python 3
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: '3.x'
|
|
|
|
- uses: actions/setup-go@v1
|
|
with:
|
|
go-version: '1.13.x'
|
|
|
|
- run: cd go/genesis-tools && go build . && cp genesis-tools /tmp/genesis-tools
|
|
|
|
- run: pip3 install -r .github/scripts/python/requirements.txt
|
|
|
|
- name: Validate the entity package name
|
|
run: python3 .github/scripts/python/validate_pull_request.py
|
|
env:
|
|
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
|
|
|
- name: Validate entity packages
|
|
run: mkdir /tmp/unpack && python3 .github/scripts/python/unpack_entities.py ./entities /tmp/unpack
|
|
|
|
- name: Copy consensus params into the temp directory
|
|
run: cp .github/test_consensus_params.json /tmp/unpack/consensus_params.json
|
|
|
|
- name: Generate a staking genesis
|
|
run: /tmp/genesis-tools staking_genesis --staking.entities_dir /tmp/unpack --log.level debug --staking.faucet.address AAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBB= --staking.faucet.amount 2000000000 --staking.default_self_escrow 500 --output-path /tmp/staking.json
|
|
|
|
- name: Download oasis-node
|
|
run: curl -Lo /tmp/oasis-node.tar.gz https://github.com/oasislabs/the-quest-entities/releases/download/DO_NOT_USE/oasis-node-linux-amd64.tar.gz
|
|
|
|
- name: Unpack oasis-node
|
|
run: cd /tmp && tar xvf oasis-node.tar.gz && chmod +x /tmp/oasis-node
|
|
|
|
- name: Generate a genesis document
|
|
run: python3 .github/scripts/python/generate_genesis.py /tmp/unpack
|
|
|
|
- name: Sanity check genesis file
|
|
run: /tmp/oasis-node genesis check --genesis.file /tmp/genesis.json
|