Skaled Nightly Tests #1441
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: Skaled Nightly Tests | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
inputs: | |
skaled_release: | |
description: 'Skaled Release' | |
default: 'develop-latest' | |
required: true | |
jobs: | |
main_job: | |
runs-on: ubuntu-20.04 | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
SKALED_RELEASE: ${{ github.event.inputs.skaled_release || 'develop-latest' }} | |
#SKALED_RELEASE: develop-latest | |
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
TF_VAR_access_key: ${{ secrets.AWS_ACCESS_KEY }} | |
TF_VAR_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
NO_ULIMIT_CHECK: 1 | |
steps: | |
- name: Set up Node | |
uses: actions/setup-node@v3.4.0 | |
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 cpulimit | |
sudo npm install -g truffle | |
sudo npm install -g yarn | |
curl -O https://download.docker.com/linux/debian/dists/buster/pool/stable/amd64/containerd.io_1.4.3-1_amd64.deb | |
sudo apt install ./containerd.io_1.4.3-1_amd64.deb # for docker! https://stackoverflow.com/questions/65555109/docker-ce-depends-containerd-io-1-4-1-but-it-is-not-going-to-be-installe | |
sudo chown -R runner:runner ~/.config # HACK | |
- name: Add secrets | |
run: | | |
touch ~/.netrc | |
chmod 600 ~/.netrc | |
echo "machine github.com" > ~/.netrc | |
echo "login ${{ secrets.DIMALIT_ACCESS_TOKEN }}" >> ~/.netrc | |
echo "password ${{ secrets.DIMALIT_ACCESS_TOKEN }}" >> ~/.netrc | |
echo "${{ secrets.elvis_oregon_pem }}" > ~/elvis-oregon.pem | |
- uses: docker-practice/actions-setup-docker@v1 | |
- uses: hashicorp/setup-terraform@v1.1.0 | |
with: | |
terraform_wrapper: false | |
- uses: actions/checkout@v2 | |
with: | |
ssh-key: '${{secrets.RUNNER_SSH_KEY}}' | |
submodules: 'recursive' | |
- run: cd skaled_providers/endpoint_by_terraform_with_containers/tf/tf_scripts && terraform init | |
- 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+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+internals+test_node_rotation | |
run: SKALED_PROVIDER=skaled_providers/binary_from_container ./run_tests.sh skaled+internals+test_node_rotation | |
- name: skaled+internals+stop_in_snapshot | |
run: SKALED_PROVIDER=skaled_providers/binary_from_container ./run_tests.sh skaled+internals+stop_in_snapshot | |
- name: skaled+internals+test_snapshot_api | |
run: SKALED_PROVIDER=skaled_providers/binary_from_container ./run_tests.sh skaled+internals+test_snapshot_api | |
- 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* | |
/tmp/*.log | |
*.log | |
./integration_tests/skaled/internals/third_party/skale-node-tests/btrfs | |
!**/.env | |
!**/*.tfvars |