Skip to content

feat(e2e): add increment contract FE-893 #1175

feat(e2e): add increment contract FE-893

feat(e2e): add increment contract FE-893 #1175

Workflow file for this run

name: Tests
on:
pull_request:
branches: [main]
types: [opened, synchronize, reopened]
push:
branches:
- release
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
FORC_VERSION: 0.63.3
CORE_VERSION: 0.35.0
jobs:
tests-vitest:
name: Vitest Tests
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0
- uses: FuelLabs/github-actions/setups/docker@master
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Install Fuel toolchain
uses: FuelLabs/[email protected]
with:
name: my-toolchain
components: forc@${{ env.FORC_VERSION }}, fuel-core@${{ env.CORE_VERSION }}
- name: Find PR number
uses: jwalton/gh-find-current-pr@v1
if: ${{ github.event_name == 'pull_request' }}
id: findPr
- name: Run Vitest
run: |
pnpm test:ci
- name: Publish Fuel Wallet Coverage
uses: davelosert/vitest-coverage-report-action@v2
if: ${{ always() && steps.findPr.outputs.number }}
with:
name: 'Fuel Wallet'
working-directory: ./packages/fuel-wallet
json-summary-path: ./coverage/coverage-summary.json
json-final-path: ./coverage/coverage-final.json
- name: Publish Fuel Development Wallet Coverage
uses: davelosert/vitest-coverage-report-action@v2
if: ${{ always() && steps.findPr.outputs.number }}
with:
name: 'Fuel Development Wallet'
working-directory: ./packages/fuel-development-wallet
json-summary-path: ./coverage/coverage-summary.json
json-final-path: ./coverage/coverage-final.json
- name: Publish Fuelet Wallet Coverage
uses: davelosert/vitest-coverage-report-action@v2
if: ${{ always() && steps.findPr.outputs.number }}
with:
name: 'Fuelet Wallet'
working-directory: ./packages/fuelet-wallet
json-summary-path: ./coverage/coverage-summary.json
json-final-path: ./coverage/coverage-final.json
tests-e2e-connectors:
name: E2E
runs-on: buildjet-8vcpu-ubuntu-2204
steps:
- name: Check out the code
uses: actions/checkout@v3
- name: Setup Node
uses: FuelLabs/github-actions/setups/node@master
with:
node-version: 20.11.0
pnpm-version: 9.5.0
- uses: FuelLabs/github-actions/setups/docker@master
with:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Start Test Node
run: pnpm node:up
- name: Run PNPM install
id: pnpm-cache
run: pnpm install --frozen-lockfile
- name: Run build:connectors
run: pnpm build:connectors
- uses: ./.github/workflows/setup-rust
- name: Verify Forc and Fuel-Core
run: |
forc --version
fuel-core --version
# Check the directory structure before deployment
- name: Debug Paths Before Deployment
run: |
echo "Checking paths before deployment"
ls -la e2e-tests/runner/src
ls -la examples/react-app/src/types/
- name: Build & Deploy Contracts
run: pnpm deploy:contracts
working-directory: e2e-tests/runner
# Check the directory structure after deployment
- name: Debug Paths After Deployment
run: |
echo "Checking paths after deployment"
ls -la e2e-tests/runner/src/contracts/
ls -la examples/react-app/src/types/
# E2E tests running with Playwright
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps chromium
working-directory: e2e-tests/runner
- name: Run Playwright tests locally for Preview
if: ${{ github.event_name == 'pull_request' }}
run: xvfb-run --auto-servernum -- pnpm --filter @e2e-tests/runner test:e2e
env:
VITE_FUEL_PROVIDER_URL: "http://localhost:4000/v1/graphql"
NEXT_PUBLIC_PROVIDER_URL: "http://localhost:4000/v1/graphql"
NEXT_PUBLIC_WC_PROJECT_ID: e01471314fc69cc4efba6dce12dfd710
NEXT_PUBLIC_CHAIN_ID_NAME: local
REACT_APP_PORT: 5173
REACT_NEXT_PORT: 3002
VITE_WALLET_SECRET: "0xa449b1ffee0e2205fa924c6740cc48b3b473aa28587df6dab12abc245d1f5298"
VITE_MASTER_WALLET_MNEMONIC: ${{ secrets.VITE_MASTER_WALLET_MNEMONIC }}
VITE_APP_WC_PROJECT_ID: e01471314fc69cc4efba6dce12dfd710
VITE_CHAIN_ID_NAME: local
PORT: 5173