Skip to content

Merge branch 'feat/factory-address-registry' of github.com:hadronlabs… #2102

Merge branch 'feat/factory-address-registry' of github.com:hadronlabs…

Merge branch 'feat/factory-address-registry' of github.com:hadronlabs… #2102

Workflow file for this run

on:
push:
branches:
- "**"
name: tests
jobs:
clippy:
name: Actions - clippy
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.75.0
components: clippy
profile: minimal
override: true
target: wasm32-unknown-unknown
- run: cargo fetch --verbose
- run: cargo clippy --all --all-targets -- -D warnings
- run: cargo clippy --lib --target wasm32-unknown-unknown -- -D warnings
coverage:
name: Actions - unit tests coverage
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y pkg-config libssl-dev
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2023-12-21
profile: minimal
override: true
- name: Install cargo-tarpaulin
run: cargo install cargo-tarpaulin --version 0.29.1
- run: cargo tarpaulin --verbose --exclude-files "packages/*" --exclude-files "*/proto/*"
--exclude-files "contracts/price-provider/*" --exclude-files
"contracts/auto-withdrawer/*" --exclude-files
"contracts/hook-tester/*" --exclude-files
"contracts/astroport-exchange-handler/*" --exclude-files
"contracts/proposal-votes-poc/*" --exclude-files
"contracts/rewards-manager/*" --exclude-files
"contracts/puppeteer-authz/*" --exclude-files
"contracts/validators-stats/*" --exclude-files
"contracts/provider-proposals-poc/*" --exclude-files
"contracts/redemption-rate-adapter/*" --exclude-files "*schema*" --out
Xml --output-dir ./
- name: Produce the coverage report
uses: insightsengineering/coverage-action@v2
with:
path: ./cobertura.xml
threshold: 45
fail: true
publish: false
diff: false
coverage-summary-title: Code Coverage Summary
rustfmt:
name: Actions - rustfmt
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.75.0
components: rustfmt
profile: minimal
override: true
- run: cargo fmt -- --check
unit-test:
name: Actions - unit test
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.75.0
profile: minimal
- run: cargo fetch --verbose
- run: cargo build
- run: cargo test --verbose --all
env:
RUST_BACKTRACE: 1
lint-test:
name: Actions - integration tests lint
runs-on: self-hosted
steps:
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18.16.1
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Yarn
run: npm install -g yarn
- name: Lint
run: cd integration_tests && yarn --ignore-engines && yarn lint
images-prepare:
name: Actions - images prepare
runs-on: self-hosted
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
"https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-$(uname
-s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x
/usr/local/bin/docker-compose
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18.16.1
- name: Install Yarn
run: npm install -g yarn
- name: Setup Go environment
uses: actions/[email protected]
with:
go-version: 1.2
cache: false
- name: Log in to Private Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build images
run: |
cd integration_tests
yarn build-images
artifacts-prepare:
name: Actions - artifacts prepare
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.75.0
profile: minimal
override: true
- run: make compile
- name: Cache artifacts
uses: actions/cache@v4
with:
path: artifacts
key: ${{ runner.os }}-${{ github.sha }}
test-core:
name: test:core Integration Tests
needs:
- images-prepare
- artifacts-prepare
runs-on: self-hosted
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
"https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-$(uname
-s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x
/usr/local/bin/docker-compose
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20.12.2
- name: Install Yarn
run: npm install -g yarn
- name: Log in to Private Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Clean volumes
run: docker volume prune -f
- name: Download images
run: |
cd integration_tests
yarn build-images
- name: Download artifacts
uses: actions/cache@v4
with:
path: artifacts
key: ${{ runner.os }}-${{ github.sha }}
- name: Run test test:core
run: cd integration_tests && yarn && yarn test:core
- name: Cleanup resources
if: always()
run: |
docker stop -t0 $(docker ps -a -q) || true
docker container prune -f || true
docker volume rm $(docker volume ls -q) || true
test-core-slashing:
name: test:core:slashing Integration Tests
needs:
- images-prepare
- artifacts-prepare
runs-on: self-hosted
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
"https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-$(uname
-s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x
/usr/local/bin/docker-compose
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20.12.2
- name: Install Yarn
run: npm install -g yarn
- name: Log in to Private Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Clean volumes
run: docker volume prune -f
- name: Download images
run: |
cd integration_tests
yarn build-images
- name: Download artifacts
uses: actions/cache@v4
with:
path: artifacts
key: ${{ runner.os }}-${{ github.sha }}
- name: Run test test:core:slashing
run: cd integration_tests && yarn && yarn test:core:slashing
- name: Cleanup resources
if: always()
run: |
docker stop -t0 $(docker ps -a -q) || true
docker container prune -f || true
docker volume rm $(docker volume ls -q) || true
test-pump:
name: test:pump Integration Tests
needs:
- images-prepare
- artifacts-prepare
runs-on: self-hosted
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
"https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-$(uname
-s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x
/usr/local/bin/docker-compose
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20.12.2
- name: Install Yarn
run: npm install -g yarn
- name: Log in to Private Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Clean volumes
run: docker volume prune -f
- name: Download images
run: |
cd integration_tests
yarn build-images
- name: Download artifacts
uses: actions/cache@v4
with:
path: artifacts
key: ${{ runner.os }}-${{ github.sha }}
- name: Run test test:pump
run: cd integration_tests && yarn && yarn test:pump
- name: Cleanup resources
if: always()
run: |
docker stop -t0 $(docker ps -a -q) || true
docker container prune -f || true
docker volume rm $(docker volume ls -q) || true
test-mirror:
name: test:mirror Integration Tests
needs:
- images-prepare
- artifacts-prepare
runs-on: self-hosted
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
"https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-$(uname
-s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x
/usr/local/bin/docker-compose
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20.12.2
- name: Install Yarn
run: npm install -g yarn
- name: Log in to Private Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Clean volumes
run: docker volume prune -f
- name: Download images
run: |
cd integration_tests
yarn build-images
- name: Download artifacts
uses: actions/cache@v4
with:
path: artifacts
key: ${{ runner.os }}-${{ github.sha }}
- name: Run test test:mirror
run: cd integration_tests && yarn && yarn test:mirror
- name: Cleanup resources
if: always()
run: |
docker stop -t0 $(docker ps -a -q) || true
docker container prune -f || true
docker volume rm $(docker volume ls -q) || true
test-pump-multi:
name: test:pump-multi Integration Tests
needs:
- images-prepare
- artifacts-prepare
runs-on: self-hosted
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
"https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-$(uname
-s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x
/usr/local/bin/docker-compose
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20.12.2
- name: Install Yarn
run: npm install -g yarn
- name: Log in to Private Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Clean volumes
run: docker volume prune -f
- name: Download images
run: |
cd integration_tests
yarn build-images
- name: Download artifacts
uses: actions/cache@v4
with:
path: artifacts
key: ${{ runner.os }}-${{ github.sha }}
- name: Run test test:pump-multi
run: cd integration_tests && yarn && yarn test:pump-multi
- name: Cleanup resources
if: always()
run: |
docker stop -t0 $(docker ps -a -q) || true
docker container prune -f || true
docker volume rm $(docker volume ls -q) || true
test-validators-stats:
name: test:validators-stats Integration Tests
needs:
- images-prepare
- artifacts-prepare
runs-on: self-hosted
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
"https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-$(uname
-s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x
/usr/local/bin/docker-compose
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20.12.2
- name: Install Yarn
run: npm install -g yarn
- name: Log in to Private Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Clean volumes
run: docker volume prune -f
- name: Download images
run: |
cd integration_tests
yarn build-images
- name: Download artifacts
uses: actions/cache@v4
with:
path: artifacts
key: ${{ runner.os }}-${{ github.sha }}
- name: Run test test:validators-stats
run: cd integration_tests && yarn && yarn test:validators-stats
- name: Cleanup resources
if: always()
run: |
docker stop -t0 $(docker ps -a -q) || true
docker container prune -f || true
docker volume rm $(docker volume ls -q) || true
test-validator-set:
name: test:validator-set Integration Tests
needs:
- images-prepare
- artifacts-prepare
runs-on: self-hosted
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
"https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-$(uname
-s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x
/usr/local/bin/docker-compose
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20.12.2
- name: Install Yarn
run: npm install -g yarn
- name: Log in to Private Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Clean volumes
run: docker volume prune -f
- name: Download images
run: |
cd integration_tests
yarn build-images
- name: Download artifacts
uses: actions/cache@v4
with:
path: artifacts
key: ${{ runner.os }}-${{ github.sha }}
- name: Run test test:validator-set
run: cd integration_tests && yarn && yarn test:validator-set
- name: Cleanup resources
if: always()
run: |
docker stop -t0 $(docker ps -a -q) || true
docker container prune -f || true
docker volume rm $(docker volume ls -q) || true
test-distribution:
name: test:distribution Integration Tests
needs:
- images-prepare
- artifacts-prepare
runs-on: self-hosted
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
"https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-$(uname
-s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x
/usr/local/bin/docker-compose
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20.12.2
- name: Install Yarn
run: npm install -g yarn
- name: Log in to Private Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Clean volumes
run: docker volume prune -f
- name: Download images
run: |
cd integration_tests
yarn build-images
- name: Download artifacts
uses: actions/cache@v4
with:
path: artifacts
key: ${{ runner.os }}-${{ github.sha }}
- name: Run test test:distribution
run: cd integration_tests && yarn && yarn test:distribution
- name: Cleanup resources
if: always()
run: |
docker stop -t0 $(docker ps -a -q) || true
docker container prune -f || true
docker volume rm $(docker volume ls -q) || true
test-initia:
name: test:initia Integration Tests
needs:
- images-prepare
- artifacts-prepare
runs-on: self-hosted
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
"https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-$(uname
-s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x
/usr/local/bin/docker-compose
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20.12.2
- name: Install Yarn
run: npm install -g yarn
- name: Log in to Private Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Clean volumes
run: docker volume prune -f
- name: Download images
run: |
cd integration_tests
yarn build-images
- name: Download artifacts
uses: actions/cache@v4
with:
path: artifacts
key: ${{ runner.os }}-${{ github.sha }}
- name: Run test test:initia
run: cd integration_tests && yarn && yarn test:initia
- name: Cleanup resources
if: always()
run: |
docker stop -t0 $(docker ps -a -q) || true
docker container prune -f || true
docker volume rm $(docker volume ls -q) || true
test-auto-withdrawer:
name: test:auto-withdrawer Integration Tests
needs:
- images-prepare
- artifacts-prepare
runs-on: self-hosted
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
"https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-$(uname
-s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x
/usr/local/bin/docker-compose
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20.12.2
- name: Install Yarn
run: npm install -g yarn
- name: Log in to Private Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Clean volumes
run: docker volume prune -f
- name: Download images
run: |
cd integration_tests
yarn build-images
- name: Download artifacts
uses: actions/cache@v4
with:
path: artifacts
key: ${{ runner.os }}-${{ github.sha }}
- name: Run test test:auto-withdrawer
run: cd integration_tests && yarn && yarn test:auto-withdrawer
- name: Cleanup resources
if: always()
run: |
docker stop -t0 $(docker ps -a -q) || true
docker container prune -f || true
docker volume rm $(docker volume ls -q) || true
test-gv:
name: test:gv Integration Tests
needs:
- images-prepare
- artifacts-prepare
runs-on: self-hosted
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
"https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-$(uname
-s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x
/usr/local/bin/docker-compose
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20.12.2
- name: Install Yarn
run: npm install -g yarn
- name: Log in to Private Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Clean volumes
run: docker volume prune -f
- name: Download images
run: |
cd integration_tests
yarn build-images
- name: Download artifacts
uses: actions/cache@v4
with:
path: artifacts
key: ${{ runner.os }}-${{ github.sha }}
- name: Run test test:gv
run: cd integration_tests && yarn && yarn test:gv
- name: Cleanup resources
if: always()
run: |
docker stop -t0 $(docker ps -a -q) || true
docker container prune -f || true
docker volume rm $(docker volume ls -q) || true
test-splitter:
name: test:splitter Integration Tests
needs:
- images-prepare
- artifacts-prepare
runs-on: self-hosted
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
"https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-$(uname
-s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x
/usr/local/bin/docker-compose
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20.12.2
- name: Install Yarn
run: npm install -g yarn
- name: Log in to Private Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Clean volumes
run: docker volume prune -f
- name: Download images
run: |
cd integration_tests
yarn build-images
- name: Download artifacts
uses: actions/cache@v4
with:
path: artifacts
key: ${{ runner.os }}-${{ github.sha }}
- name: Run test test:splitter
run: cd integration_tests && yarn && yarn test:splitter
- name: Cleanup resources
if: always()
run: |
docker stop -t0 $(docker ps -a -q) || true
docker container prune -f || true
docker volume rm $(docker volume ls -q) || true