Skip to content

test: fix git runner and test issues #262

test: fix git runner and test issues

test: fix git runner and test issues #262

name: Deploy App To Feature Branch
on: pull_request
jobs:
build:
name: Build and Test App
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
checks: write
defaults:
run:
working-directory: ./packages/app
outputs:
dappUrl: ${{ steps.deploy.outputs.details_url }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: Cache node modules
id: cache-nodemodules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
# Workaround for bug https://github.com/typicode/husky/issues/991
HUSKY: 0
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
working-directory: ./
if: steps.cache-nodemodules.outputs.cache-hit != 'true'
run: |
npm pkg delete scripts.prepare
npm ci
- name: Lint
run: |
npm run lint -- --no-fix --max-warnings 0
- name: Test
run: npm run test:ci
- name: Type check
run: npm run typecheck
- name: Build
run: |
VITE_VERSION=${{ github.head_ref }} \
npm run build
- name: Build Storybook
run: npm run build-storybook
- name: Update config
run: |
echo "window[\"##runtimeConfig\"] = { appEnvironment: \"staging\" };" > dist/config.js
- name: Deploy
uses: matter-labs/action-hosting-deploy@main
id: deploy
with:
repoToken: "${{ github.token }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_STAGING_SCAN_V2 }}"
expires: 7d
projectId: staging-scan-v2
entryPoint: ./packages/app
mainnet:
needs: build
name: Feature Env, Mainnet+
uses: ./.github/workflows/app-e2e.yml
secrets: inherit
permissions:
contents: read
with:
targetUrl: ${{ needs.build.outputs.dappUrl }}
default_network_value_for_e2e: "/?network=mainnet"
publish_to_allure: true
environmentTags: "and not @stagingEnv"