Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry only failed tests #515

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,14 @@ jobs:
GAS_REPORT: "./gas-<< parameters.chain-id >>-<< parameters.preset >>.csv"
command: |
TEST_FILES=$(circleci tests glob 'e2e/tests/<< parameters.toml >>/*.e2e.js')
echo "$TEST_FILES" | circleci tests run --verbose --split-by=timings --command="xargs yarn mocha --no-bail --exit"
echo "$TEST_FILES" | circleci tests run --verbose --split-by=timings --command="xargs node --test --test-reporter tap --test-reporter junit --test-reporter-destination=stdout --test-reporter-destination=/tmp/junit.xml"

- store_test_results:
path: "/tmp/junit.xml"

- store_artifacts:
path: "/tmp/junit.xml"
destination: "junit.xml"

- store_artifacts:
path: "./debug-<< parameters.chain-id >>-<< parameters.preset >>.log"
Expand Down Expand Up @@ -419,7 +426,14 @@ jobs:
GAS_REPORT: "./gas-<< parameters.chain-id >>-<< parameters.preset >>.csv"
command: |
TEST_FILES=$(circleci tests glob 'e2e/tests/<< parameters.toml >>/*.e2e.js')
echo "$TEST_FILES" | circleci tests run --verbose --split-by=timings --command="xargs yarn mocha --no-bail --exit"
echo "$TEST_FILES" | circleci tests run --verbose --split-by=timings --command="xargs node --test --test-reporter tap --test-reporter junit --test-reporter-destination=stdout --test-reporter-destination=/tmp/junit.xml"

- store_test_results:
path: "/tmp/junit.xml"

- store_artifacts:
path: "/tmp/junit.xml"
destination: "junit.xml"

- store_artifacts:
path: "./debug-<< parameters.chain-id >>-<< parameters.preset >>.log"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This is a GitOps repo for deployment of the [Synthetix](https://www.github.com/s
Sometimes newer or older versions of cannon may produce incompatible state and as a result deployment state will be borked.
Using exactly same cannon version as all the repo maintainers use is a requirement and not an recommendation.

Run `yarn upgrade-interactive` and make sure that `@usecannon/cli` and `hardhat-cannon` are updated to the latest versions.
Run `yarn upgrade-interactive` and make sure that `@usecannon/cli` and `@usecannon/builder` are updated to the latest versions.
If not, make a separate PR with cannon update (even though cannon updates are automated, there is a delay up to a day for that to happen)

After installing for the first time, run `yarn cannon setup` to configure a reliable IPFS URL for publishing packages and any other preferred settings,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const assert = require('assert');
const { ethers } = require('ethers');
const crypto = require('crypto');
Expand Down
1 change: 1 addition & 0 deletions e2e/tests/omnibus-arbitrum-mainnet.toml/Rewards_ARB.e2e.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const assert = require('assert');
const { ethers } = require('ethers');
require('../../inspect');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const assert = require('assert');
const { ethers } = require('ethers');
require('../../inspect');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const assert = require('assert');
const { ethers } = require('ethers');
require('../../inspect');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const assert = require('assert');
const { ethers } = require('ethers');
const crypto = require('crypto');
Expand Down
1 change: 1 addition & 0 deletions e2e/tests/omnibus-arbitrum-sepolia.toml/Rewards_ARB.e2e.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const assert = require('assert');
const { ethers } = require('ethers');
require('../../inspect');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const assert = require('assert');
const { ethers } = require('ethers');
require('../../inspect');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const assert = require('assert');
const { ethers } = require('ethers');
const crypto = require('crypto');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const assert = require('assert');
const { ethers } = require('ethers');
require('../../inspect');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const assert = require('assert');
const { ethers } = require('ethers');
require('../../inspect');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const assert = require('assert');
const { ethers } = require('ethers');
const crypto = require('crypto');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
1 change: 1 addition & 0 deletions e2e/tests/omnibus-mainnet.toml/LegacyMarket.e2e.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const assert = require('assert');
const { getLpPosition } = require('../../tasks/getLpPosition');
const { getAccountCollateral } = require('../../tasks/getAccountCollateral');
Expand Down
1 change: 1 addition & 0 deletions e2e/tests/omnibus-mainnet.toml/Staking.e2e.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const assert = require('assert');
const { ethers } = require('ethers');
const crypto = require('crypto');
Expand Down
1 change: 1 addition & 0 deletions e2e/tests/omnibus-optimism-mainnet.toml/Stub.e2e.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
1 change: 1 addition & 0 deletions e2e/tests/omnibus-sepolia.toml/BFP_Market_ETH.e2e.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers, BigNumber } = require('ethers');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers, BigNumber } = require('ethers');
Expand Down
1 change: 1 addition & 0 deletions e2e/tests/omnibus-sepolia.toml/BFP_Market_snxUSD.e2e.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
1 change: 1 addition & 0 deletions e2e/tests/omnibus-sepolia.toml/LegacyMarket.e2e.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const assert = require('assert');
const { getLpPosition } = require('../../tasks/getLpPosition');
const { getAccountCollateral } = require('../../tasks/getAccountCollateral');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
1 change: 1 addition & 0 deletions e2e/tests/omnibus-snaxchain-mainnet.toml/Stub.e2e.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
1 change: 1 addition & 0 deletions e2e/tests/omnibus-snaxchain-testnet.toml/Stub.e2e.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { describe, it, before, after } = require('node:test');
const crypto = require('crypto');
const assert = require('assert');
const { ethers } = require('ethers');
Expand Down
27 changes: 9 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
"build:arbitrum-sepolia": "cannon build omnibus-arbitrum-sepolia.toml --dry-run --port 8545 --upgrade-from synthetix-omnibus:latest@main --chain-id 421614 --provider-url https://arbitrum-sepolia.infura.io/v3/$INFURA_API_KEY | tee ./e2e/cannon-build.log",
"build:snax": "cannon build omnibus-snaxchain-mainnet.toml --dry-run --port 8545 --upgrade-from synthetix-omnibus:latest@main --chain-id 2192 --provider-url https://mainnet.snaxchain.io | tee ./e2e/cannon-build.log",
"build:snax-testnet": "cannon build omnibus-snaxchain-testnet.toml --dry-run --port 8545 --upgrade-from synthetix-omnibus:latest@main --chain-id 13001 --provider-url https://testnet.snaxchain.io | tee ./e2e/cannon-build.log",
"test:mainnet": "DEBUG='e2e:*' mocha ./e2e/tests/omnibus-mainnet.toml/**/*.e2e.js",
"test:sepolia": "DEBUG='e2e:*' mocha ./e2e/tests/omnibus-sepolia.toml/**/*.e2e.js",
"test:optimism": "DEBUG='e2e:*' mocha ./e2e/tests/omnibus-optimism-mainnet.toml/**/*.e2e.js",
"test:base": "DEBUG='e2e:*' mocha ./e2e/tests/omnibus-base-mainnet-andromeda.toml/**/*.e2e.js",
"test:base-sepolia": "DEBUG='e2e:*' mocha ./e2e/tests/omnibus-base-sepolia-andromeda.toml/**/*.e2e.js",
"test:arbitrum": "DEBUG='e2e:*' mocha ./e2e/tests/omnibus-arbitrum-mainnet.toml/**/*.e2e.js",
"test:arbitrum-sepolia": "DEBUG='e2e:*' mocha ./e2e/tests/omnibus-arbitrum-sepolia.toml/**/*.e2e.js",
"test:snax": "DEBUG='e2e:*' mocha ./e2e/tests/omnibus-snaxchain-mainnet.toml/**/*.e2e.js",
"test:snax-testnet": "DEBUG='e2e:*' mocha ./e2e/tests/omnibus-snaxchain-testnet.toml/**/*.e2e.js",
"test:mainnet": "DEBUG='e2e:*' node --test --test-reporter spec ./e2e/tests/omnibus-mainnet.toml/**/*.e2e.js",
"test:sepolia": "DEBUG='e2e:*' node --test --test-reporter spec ./e2e/tests/omnibus-sepolia.toml/**/*.e2e.js",
"test:optimism": "DEBUG='e2e:*' node --test --test-reporter spec ./e2e/tests/omnibus-optimism-mainnet.toml/**/*.e2e.js",
"test:base": "DEBUG='e2e:*' node --test --test-reporter spec ./e2e/tests/omnibus-base-mainnet-andromeda.toml/**/*.e2e.js",
"test:base-sepolia": "DEBUG='e2e:*' node --test --test-reporter spec ./e2e/tests/omnibus-base-sepolia-andromeda.toml/**/*.e2e.js",
"test:arbitrum": "DEBUG='e2e:*' node --test --test-reporter spec ./e2e/tests/omnibus-arbitrum-mainnet.toml/**/*.e2e.js",
"test:arbitrum-sepolia": "DEBUG='e2e:*' node --test --test-reporter spec ./e2e/tests/omnibus-arbitrum-sepolia.toml/**/*.e2e.js",
"test:snax": "DEBUG='e2e:*' node --test --test-reporter spec ./e2e/tests/omnibus-snaxchain-mainnet.toml/**/*.e2e.js",
"test:snax-testnet": "DEBUG='e2e:*' node --test --test-reporter spec ./e2e/tests/omnibus-snaxchain-testnet.toml/**/*.e2e.js",
"pretty": "prettier . '**/*.toml' --write",
"pretty:check": "prettier . '**/*.toml' --check",
"fetch-deployments": "DEBUG='e2e:*' node e2e/extractCannonState ./e2e/cannon-build.log > /tmp/cannonState.json && DEBUG='e2e:*' node e2e/generateDeployments /tmp/cannonState.json",
Expand All @@ -58,8 +58,6 @@
"@usecannon/cli": "2.18.4",
"debug": "^4.3.7",
"ethers": "^5.7.2",
"hardhat": "^2.22.14",
"mocha": "^10.7.3",
"numbro": "^2.5.0",
"pako": "^2.1.0",
"prettier": "^3.3.3",
Expand All @@ -68,12 +66,5 @@
"supports-color": "^8.1.1",
"viem": "^2.21.34"
},
"mocha": {
"timeout": "5m",
"recursive": true,
"bail": true,
"async-only": true,
"exit": true
},
"packageManager": "yarn@4.5.1"
}
Loading