Skip to content

Manual/Periodic Tests #18

Manual/Periodic Tests

Manual/Periodic Tests #18

Workflow file for this run

name: Manual
env:
CI: true
FORCE_COLOR: 1
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/ms-playwright
on:
schedule:
- cron: '15 * * * *'
workflow_dispatch:
inputs:
metamask-tag:
description: 'Tag of metamask to download. ie. "v10.27.0"'
metamask-seed:
description: 'Seed to use for metamask'
metamask-password:
description: 'Password to use for metamask'
metamask-snap-id:
description: 'Snap ID to use for metamask. ie. "npm:filsnap"'
metamask-snap-version:
description: 'Snap version to use for metamask'
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/[email protected]
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
- run: pnpm install
- run: pnpm dlx playwright install --with-deps chromium
- run: echo "${{ github.event_name}}"
- run: pnpm -r --filter filsnap run test
id: tests
env:
GITHUB_TOKEN: ${{ github.token }}
METAMASK_TAG: ${{ inputs.metamask-tag }}
METAMASK_MNEMONIC: ${{ inputs.metamask-seed }}
METAMASK_PASSWORD: ${{ inputs.metamask-password }}
METAMASK_SNAP_ID: ${{ inputs.metamask-snap-id }}
METAMASK_SNAP_VERSION: ${{ inputs.metamask-snap-version }}
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: packages/testing/playwright-report/
retention-days: 30
- name: Check for playwright-report
id: check_report
if: always()
uses: andstor/file-existence-action@v2
with:
files: packages/testing/playwright-report
- name: Add report to web3.storage
if: always() && steps.check_report.outputs.files_exists == 'true' && steps.tests.outcome != 'success'
uses: web3-storage/add-to-web3@v2
id: add_to_web3_storage
with:
path_to_add: packages/testing/playwright-report
web3_token: ${{ secrets.WEB3_TOKEN }}
- name: Add url to GITHUB_STEP_SUMMARY
if: always() && steps.check_report.outputs.files_exists == 'true' && steps.tests.outcome != 'success'
run: |
echo "
### Snap Tests failed 🤷🏻‍♂️
Check report and traces: https://w3s.link/ipfs/${{ steps.add_to_web3_storage.outputs.cid }}
" >> $GITHUB_STEP_SUMMARY