Skip to content

Commit

Permalink
Merge pull request #89 from AstarNetwork/update-deps-and-ci
Browse files Browse the repository at this point in the history
update deps and ci
  • Loading branch information
ermalkaleci authored Dec 5, 2024
2 parents 52828c3 + c729def commit 90721d0
Show file tree
Hide file tree
Showing 9 changed files with 521 additions and 519 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ env:
jobs:
tests:
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
tests: [xcm-transfer, staking]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -30,7 +26,7 @@ jobs:

- run: yarn update-env

- run: yarn test tests/${{ matrix.tests }} | tee output.txt ; exit ${PIPESTATUS[0]}
- run: yarn test | tee output.txt ; exit ${PIPESTATUS[0]}

- if: ${{ failure() }}
run: grep -q "Test timed out" output.txt && echo "TIMEOUT=true" >> $GITHUB_ENV || exit 0
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ env:
jobs:
tests:
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
tests: [xcm-transfer, staking]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -29,4 +25,4 @@ jobs:
- run: yarn --immutable
- run: yarn lint
- run: yarn update-env
- run: yarn test tests/${{ matrix.tests }}
- run: yarn test
4 changes: 2 additions & 2 deletions networks/astar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ export type Vars = {
export default {
polkadot: {
name: 'astar' as const,
endpoint: 'wss://rpc.astar.network',
endpoint: ['wss://rpc.astar.network', 'wss://astar-rpc.dwellir.com'],
relayToken: '340282366920938463463374607431768211455',
},
kusama: {
name: 'shiden' as const,
endpoint: 'wss://rpc.shiden.astar.network',
endpoint: ['wss://rpc.shiden.astar.network', 'wss://shiden-rpc.dwellir.com'],
relayToken: '340282366920938463463374607431768211455',
},
config: ({ alice, relayToken }) => ({
Expand Down
4 changes: 2 additions & 2 deletions networks/polkadot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { Config } from './types'
export default {
polkadot: {
name: 'polkadot' as const,
endpoint: 'wss://rpc.polkadot.io',
endpoint: ['wss://rpc.polkadot.io', 'wss://polkadot-rpc.dwellir.com'],
},
kusama: {
name: 'kusama' as const,
endpoint: 'wss://kusama-rpc.polkadot.io',
endpoint: ['wss://kusama-rpc.polkadot.io', 'wss://kusama-rpc.dwellir.com'],
},
config: ({ alice }) => ({
storages: {
Expand Down
2 changes: 1 addition & 1 deletion networks/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export type NetworkKind = 'polkadot' | 'kusama'

export type NetworkConfig = {
name: string
endpoint: string
endpoint: string | string[]
}

export type Context = ReturnType<typeof testingPairs>
Expand Down
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,29 @@
"update-env": "tsx scripts/update-env.ts"
},
"dependencies": {
"@acala-network/chopsticks": "^1.0.1-1",
"@acala-network/chopsticks-testing": "^1.0.1-1",
"@polkadot/api": "^14.2.3",
"@swc/core": "^1.8.0",
"axios": "^1.7.7",
"dotenv": "^16.4.5",
"@acala-network/chopsticks": "^1.0.1",
"@acala-network/chopsticks-testing": "^1.0.1",
"@polkadot/api": "^14.0",
"@swc/core": "^1.10.0",
"axios": "^1.7.9",
"dotenv": "^16.4.7",
"lodash": "^4.17.21",
"typescript": "5.6.3",
"typescript": "5.7.2",
"unplugin-swc": "^1.5.1",
"vitest": "^2.1.4"
"vitest": "^2.1.8"
},
"devDependencies": {
"@eslint/js": "^9.14.0",
"@eslint/js": "^9.16.0",
"@types/eslint__js": "^8.42.3",
"@types/lodash": "^4.17.13",
"@types/node": "^22.9.0",
"@vitest/ui": "^2.1.4",
"eslint": "^9.14.0",
"husky": "^9.1.6",
"@types/node": "^22.10.1",
"@vitest/ui": "^2.1.8",
"eslint": "^9.16.0",
"husky": "^9.1.7",
"lint-staged": "^15.2.10",
"prettier": "^3.3.3",
"prettier": "^3.4.2",
"tsx": "^4.19.2",
"typescript-eslint": "8.4.0"
"typescript-eslint": "8.17.0"
},
"prettier": {
"tabWidth": 2,
Expand Down
2 changes: 1 addition & 1 deletion scripts/update-env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const main = async () => {
const blockNumber = header.number.toNumber()
return `${name.toUpperCase()}_BLOCK_NUMBER=${blockNumber}`
} catch (e: any) {
throw new Error(`${endpoint} ${e.message}`)
throw new Error(`${JSON.stringify(endpoint)} ${e.message}`)
}
}
blockNumbers.push(fn())
Expand Down
1 change: 1 addition & 0 deletions vitest.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default defineConfig({
hookTimeout: 300_000,
testTimeout: 300_000,
pool: 'forks',
poolOptions: { forks: { singleFork: !!process.env.GITHUB_ACTIONS } },
passWithNoTests: true,
reporters: process.env.GITHUB_ACTIONS ? ['basic', 'github-actions'] : ['verbose'],
},
Expand Down
Loading

0 comments on commit 90721d0

Please sign in to comment.