integration-test #16432
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: integration-test | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: "0 * * * *" | |
jobs: | |
integration-test-local: | |
name: integration-test-local-node-${{ matrix.node }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node: | |
- 18 | |
- 16 | |
- 14 | |
- 12 | |
steps: | |
- name: checkout-ic | |
run: | | |
pushd ${{ runner.temp }} | |
git clone https://github.com/dfinity/ic.git | |
popd | |
- name: extract-ic | |
run: | | |
sudo apt install -y \ | |
rclone | |
pushd ${{ runner.temp }}/ic | |
pip3 install --user -r gitlab-ci/src/requirements.txt | |
gitlab-ci/src/artifacts/rclone_download.py \ | |
--latest-to \ | |
--mark-executable \ | |
--out=artifacts/release \ | |
--remote-path=release \ | |
--unpack | |
gitlab-ci/src/artifacts/rclone_download.py \ | |
--latest-to \ | |
--out=artifacts/canisters \ | |
--remote-path=canisters \ | |
--unpack | |
popd | |
- name: start-ic | |
run: | | |
env \ | |
RUST_BACKTRACE=1 \ | |
RUST_MIN_STACK=8192000 \ | |
${{ runner.temp }}/ic/artifacts/release/ic-starter \ | |
--replica-path ${{ runner.temp }}/ic/artifacts/release/replica \ | |
--state-dir "$(mktemp -d)" \ | |
--create-funds-whitelist "*" \ | |
--consensus-pool-backend rocksdb \ | |
--subnet-type system \ | |
--http-port 2053 \ | |
--initial-notary-delay-millis 600 & | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: init-ic | |
run: | | |
${{ runner.temp }}/ic/artifacts/release/ic-nns-init \ | |
--initial-neurons test/neurons.csv \ | |
--initialize-ledger-with-test-accounts db0bd98f8268213b0b74b238c1611848830f47a5c416ae27ae4b80cde7216c57 \ | |
--url http://127.0.0.1:2053 \ | |
--wasm-dir ${{ runner.temp }}/ic/artifacts/canisters | |
- name: start-rosetta | |
run: | | |
pushd ${{ runner.temp }}/ic/rs/rosetta-api | |
${{ runner.temp }}/ic/artifacts/release/ic-rosetta-api \ | |
--ic-url http://127.0.0.1:2053 \ | |
--address 127.0.0.1 \ | |
--port 8080 \ | |
--store-type sqlite-in-memory & | |
popd | |
- name: setup-node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
check-latest: true | |
- name: test | |
run: | | |
npm install | |
npm run build | |
sleep 10 | |
node --unhandled-rejections=strict ./test/test-local.js | |
node --unhandled-rejections=strict ./test/test-staking.js | |
node --unhandled-rejections=strict ./test/test-staking-merge-spawn.js | |
- name: artifact-upload | |
uses: actions/upload-artifact@v3 | |
if: ${{ matrix.node == 14 }} | |
with: | |
name: dist | |
path: dist |