Skip to content

Commit

Permalink
Revert "Debug CI"
Browse files Browse the repository at this point in the history
  • Loading branch information
yivlad committed Aug 25, 2023
1 parent f9dbf37 commit 0319d9c
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 91 deletions.
159 changes: 79 additions & 80 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,85 +19,84 @@ jobs:
node-version: ${{ matrix.node }}
- run: npm i -g [email protected]
- run: pnpm install --frozen-lockfile --strict-peer-dependencies
# - run: pnpm run lint
- run: pnpm run lint
- run: pnpm run build
- run: pnpm run test
working-directory: packages/core
# test-example:
# runs-on: ubuntu-latest
# timeout-minutes: 25
# steps:
# - uses: actions/checkout@v2
# - name: Use Node.js
# uses: actions/setup-node@v1
# with:
# node-version: '16.x'
# - run: npm i -g [email protected]
# - run: pnpm install --frozen-lockfile --strict-peer-dependencies
# - name: Build dependencies
# run: |
# set -e
# pnpm run build
# working-directory: packages
# - name: Run playwright example
# run: |
# set -e
# LOCALHOST_URL='http://localhost:8545' pnpm start &
# xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- pnpm test:playwright
# env:
# MAINNET_URL: ${{ secrets.MAINNET_PROVIDER_URL }}
# DEBUG: usedapp*
# working-directory: packages/example
# - name: Run playwright example-next
# run: |
# set -e
# echo "NEXT_PUBLIC_LOCALHOST_URL=http://localhost:8545" > .env.local
# echo "NEXT_PUBLIC_MAINNET_URL=${MAINNET_URL}" >> .env.local
# pnpm dev &
# xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- pnpm test:playwright
# env:
# MAINNET_URL: ${{ secrets.MAINNET_PROVIDER_URL }}
# DEBUG: usedapp*
# working-directory: packages/example-next
# - name: Cleanup
# if: always()
# run: |
# rm -rf .env.local
# working-directory: packages/example-next
# test-docs:
# runs-on: ubuntu-latest
# timeout-minutes: 25
# steps:
# - uses: actions/checkout@v2
# - name: Use Node.js
# uses: actions/setup-node@v1
# with:
# node-version: '16.x'
# - run: npm i -g [email protected]
# - run: pnpm install --frozen-lockfile --strict-peer-dependencies
# - name: Build dependencies
# run: pnpm run build
# working-directory: packages
# - name: Run playwright
# run: |
# set -e
# pnpm run generate
# pnpm start &
# sleep 15
# xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- pnpm test:playwright
# env:
# MAINNET_URL: ${{ secrets.MAINNET_PROVIDER_URL }}
# DEBUG: usedapp*
# working-directory: packages/docs
# check-mixed-changesets:
# timeout-minutes: 5
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Use Node.js
# uses: actions/setup-node@v1
# with:
# node-version: '16.x'
# - run: npm i -g [email protected]
# - run: pnpm install --frozen-lockfile --filter="usedapp"
# - run: pnpm changeset version
test-example:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
- run: npm i -g [email protected]
- run: pnpm install --frozen-lockfile --strict-peer-dependencies
- name: Build dependencies
run: |
set -e
pnpm run build
working-directory: packages
- name: Run playwright example
run: |
set -e
LOCALHOST_URL='http://localhost:8545' pnpm start &
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- pnpm test:playwright
env:
MAINNET_URL: ${{ secrets.MAINNET_PROVIDER_URL }}
DEBUG: usedapp*
working-directory: packages/example
- name: Run playwright example-next
run: |
set -e
echo "NEXT_PUBLIC_LOCALHOST_URL=http://localhost:8545" > .env.local
echo "NEXT_PUBLIC_MAINNET_URL=${MAINNET_URL}" >> .env.local
pnpm dev &
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- pnpm test:playwright
env:
MAINNET_URL: ${{ secrets.MAINNET_PROVIDER_URL }}
DEBUG: usedapp*
working-directory: packages/example-next
- name: Cleanup
if: always()
run: |
rm -rf .env.local
working-directory: packages/example-next
test-docs:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
- run: npm i -g [email protected]
- run: pnpm install --frozen-lockfile --strict-peer-dependencies
- name: Build dependencies
run: pnpm run build
working-directory: packages
- name: Run playwright
run: |
set -e
pnpm run generate
pnpm start &
sleep 15
xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- pnpm test:playwright
env:
MAINNET_URL: ${{ secrets.MAINNET_PROVIDER_URL }}
DEBUG: usedapp*
working-directory: packages/docs
check-mixed-changesets:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
- run: npm i -g [email protected]
- run: pnpm install --frozen-lockfile --filter="usedapp"
- run: pnpm changeset version
9 changes: 2 additions & 7 deletions packages/core/src/hooks/useCall.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ describe('useCall', () => {
})
})

it.only('Properly handles refresh per block', async () => {
it('Properly handles refresh per block', async () => {
const { config, network1 } = await setupTestingConfig({ multicallVersion })
const blockNumberContract = await deployContract(network1.deployer, BlockNumberContract)
const secondBlockNumberContract = await deployContract(network1.deployer, BlockNumberContract)
Expand All @@ -306,10 +306,6 @@ describe('useCall', () => {
}
)

console.log({
block1,
block2,
})
return { block1, block2 }
},
{
Expand Down Expand Up @@ -341,13 +337,12 @@ describe('useCall', () => {
await network1.provider.mine()
}

await waitForExpect(async () => {
await waitForExpect(() => {
expect(getResultProperty(result, 'block1')).to.eq(blockNumber + 5)
const block2 = Number(getResultProperty(result, 'block2'))
// we don't actually know when the update is gonna happen - both possibilities are possible
expect(block2 === blockNumber + 4 || block2 === blockNumber + 5).to.be.true
})
console.log('357')
})

it('Refreshes static call on parameter change', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ export async function subscribeToNewBlock(
await provider.on('block', update)

provider.getBlockNumber().then(
(blockNumber) => {
console.log('new block', blockNumber)
update(blockNumber)
},
(blockNumber) => update(blockNumber),
(err) => {
console.error(err)
}
Expand Down

0 comments on commit 0319d9c

Please sign in to comment.