Skip to content

Commit

Permalink
Merge branch 'main' into pr/583
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonmanRolls authored Sep 21, 2023
2 parents 6d13940 + 76ca291 commit 9e3fd3c
Show file tree
Hide file tree
Showing 141 changed files with 6,748 additions and 6,311 deletions.
15 changes: 6 additions & 9 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,12 @@
"rules": {
"jest/expect-expect": "off"
}
},
// Only uses Testing Library lint rules in test files
{
"files": ["**/cypress/**/*.[jt]s?(x)"],
"env": { "cypress/globals": true },
"plugins": ["cypress"],
"extends": ["plugin:cypress/recommended"]
}
],
"parserOptions": {
"project": "./tsconfig.json"
},
"ignorePatterns": ["next.config.js", "jest.config.js", "deploy/**/*"],
"ignorePatterns": ["next.config.js", "jest.config.js", "deploy/**/*", "src/**/*.test.tsx", "src/**/*.test.ts"],
"rules": {
"react/react-in-jsx-scope": "off",
"react/jsx-props-no-spreading": "off",
Expand All @@ -54,7 +47,11 @@
{
"selector": "CallExpression[callee.object.name='console'][callee.property.name!=/^(log|warn|error|info|trace)$/]",
"message": "Unexpected property on console object was called"
}
},
{
"selector": "*[value=/\\b(0x)?[a-f0-9]{64}\\b/i]",
"message": "No private keys allowed"
}
],
"prettier/prettier": "error",
"import/prefer-default-export": "off",
Expand Down
62 changes: 18 additions & 44 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ jobs:
path: stateful-build.tar

stateless:
name: stateless (${{matrix.shard}})
needs: build-stateless
timeout-minutes: 20
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
steps:
- uses: actions/checkout@v3
- run: ./scripts/check-chrome.sh

- uses: pnpm/[email protected]
with:
Expand All @@ -122,40 +122,28 @@ jobs:
- name: Untar files
run: tar -xvf stateless-build.tar

- name: Install window server
run: sudo apt-get install -y fluxbox
- name: Install playwright
run: npx playwright install chromium

- name: Run tests
run: |
Xvfb :20 -screen 0 800x600x16 &
sleep 1 &&
DISPLAY=:20 fluxbox -log /tmp/fluxbox.log &
DISPLAY=:20 pnpm e2e:ci -nb
env:
CYPRESS_DEPLOYSENTINEL_KEY: ${{ secrets.CYPRESS_DEPLOYSENTINEL_KEY }}
CI_BUILD_ID: ${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}
GH_USERNAME: ${{ secrets.GH_USERNAME }}
GH_PAT: ${{ secrets.GH_PAT }}

- uses: actions/upload-artifact@v2
if: failure()
with:
name: synpress-screenshots
path: e2e/screenshots
PLAYWRIGHT_SHARD=${{matrix.shard}} PLAYWRIGHT_TOTAL=${{strategy.job-total}} pnpm e2e:ci -nb
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: always()
with:
name: synpress-videos
path: e2e/videos
name: stateless-report
path: playwright-report/
retention-days: 30

stateful:
name: stateful (${{matrix.shard}})
needs: build-stateful
timeout-minutes: 10
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [101, 102, 103, 104]
shard: [1, 2, 3]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -184,35 +172,21 @@ jobs:
- name: Untar files
run: tar -xvf stateful-build.tar

- name: Install window server
run: sudo apt-get install -y fluxbox

- name: Check chrome version
run: google-chrome --product-version
- name: Install playwright
run: npx playwright install chromium

- name: Run tests
run: |
Xvfb :20 -screen 0 800x600x16 &
sleep 1 &&
DISPLAY=:20 fluxbox -log /tmp/fluxbox.log &
parallel --lb --halt now,success=1,fail=1 ::: \
"pnpm wrangle" \
"pnpm wait-on http://localhost:8788 && DISPLAY=:20 pnpm synpress:ci:stateful --parallel --ci-build-id ${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }} --group stateful"
"pnpm wait-on http://localhost:8788 && npx playwright test --shard=${{matrix.shard}}/${{strategy.job-total}} --project=stateful"
env:
CYPRESS_DEPLOYSENTINEL_KEY: ${{ secrets.CYPRESS_DEPLOYSENTINEL_KEY }}
NEXT_PUBLIC_GRAPH_URI: https://api.thegraph.com/subgraphs/name/tateb/enssubdomaincount
SECRET_WORDS: ${{ secrets.SECRET_WORDS }}
GH_USERNAME: ${{ secrets.GH_USERNAME }}
GH_PAT: ${{ secrets.GH_PAT }}

- uses: actions/upload-artifact@v2
if: failure()
with:
name: synpress-screenshots
path: e2e/screenshots

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: always()
with:
name: synpress-videos
path: e2e/videos
name: stateful-report
path: playwright-report/
retention-days: 30
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ node_modules

# testing
/coverage
/playwright-report

# next.js
/.next/
Expand Down
Binary file modified archive.tar.lz4
Binary file not shown.
3 changes: 0 additions & 3 deletions e2e/.eslintrc.js

This file was deleted.

59 changes: 0 additions & 59 deletions e2e/clean.js

This file was deleted.

20 changes: 0 additions & 20 deletions e2e/plugin.js

This file was deleted.

36 changes: 0 additions & 36 deletions e2e/setup.js

This file was deleted.

34 changes: 0 additions & 34 deletions e2e/specs/stateful/01_address.spec.js

This file was deleted.

Loading

0 comments on commit 9e3fd3c

Please sign in to comment.