Skip to content

Run functional tests #18

Run functional tests

Run functional tests #18

name: Run functional tests
on:
workflow_call:
inputs:
version:
required: true
type: string
workflow_dispatch:
inputs:
version:
required: true
type: string
jobs:
functional-tests:
name: Functional tests
runs-on: ubuntu-20.04
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
SKALED_RELEASE: ${{ inputs.version }}
NO_ULIMIT_CHECK: 1
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
repository: skalenetwork/skale-ci-integration_tests
submodules: recursive
- name: Set up Node
uses: actions/[email protected]
with:
node-version: 16
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install python3-pip python3-venv jq btrfs-progs nodejs npm
sudo npm install -g truffle
sudo npm install -g yarn
sudo chown -R runner:runner ~/.config # HACK
- name: Prepare SGX keys/certs
run: |
echo "${{ secrets.sgx_key }}" > sgx_certs/sgx.key
chmod 600 sgx_certs/sgx.key
sudo mkdir /skale_node_data
sudo cp -r sgx_certs /skale_node_data
sudo chown -R runner:runner /skale_node_data/sgx_certs/*
wc /skale_node_data/sgx_certs/sgx.key
- name: Update Environment
run: |
./update_environment.sh skaled+internals
./update_environment.sh skaled+load_python
./update_environment.sh skaled+load_js
./update_environment.sh skaled+contractsRunningTest
./update_environment.sh skaled+filestorage
./update_environment.sh skaled+api
- name: skaled+internals+pytest
run: SKALED_PROVIDER=skaled_providers/binary_from_container ./run_tests.sh skaled+internals+pytest
- name: skaled+filestorage+all
run: SKALED_PROVIDER=skaled_providers/endpoint_by_container ./run_tests.sh skaled+filestorage+all
- name: skaled+contractsRunningTest+all
run: SKALED_PROVIDER=skaled_providers/endpoint_by_container ./run_tests.sh skaled+contractsRunningTest+all
- name: skaled+load_python+all
run: SKALED_PROVIDER=skaled_providers/binary_from_container ./run_tests.sh skaled+load_python+all
# - name: skaled+load_js+run_angry_cats
# run: SKALED_PROVIDER=skaled_providers/endpoint_by_container ./run_tests.sh skaled+load_js+run_angry_cats
- name: skaled+internals+test_snapshot_api
run: SKALED_PROVIDER=skaled_providers/binary_from_container ./run_tests.sh skaled+internals+test_snapshot_api
- name: skaled+internals+test_node_rotation
run: SKALED_PROVIDER=skaled_providers/binary_from_container ./run_tests.sh skaled+internals+test_node_rotation
- name: Fix access rights
run: |
sudo chown -R runner:runner /tmp/tmp* || true
sudo find ./integration_tests/skaled/internals/third_party/skale-node-tests/btrfs -type d -exec btrfs property set {} ro false \; || true
sudo chown -R runner:runner . || true
for C in $(docker ps -aq); do docker logs $C>$C.log; done || true
if: ${{ always() }}
- uses: actions/upload-artifact@v2
if: ${{ always() }}
continue-on-error: true
with:
name: debug
path: |
skaled_providers
!skaled_providers/**/skaled
/tmp/tmp*
*.log
./integration_tests/skaled/internals/third_party/skale-node-tests/btrfs
!**/.env