Skip to content

Commit

Permalink
chore(cip-1694): run tests on ci
Browse files Browse the repository at this point in the history
  • Loading branch information
vetalcore committed Aug 17, 2023
1 parent 1ca4c63 commit 2c3c5f7
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 45 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/build-ui.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Run Voting App UI Tests
on:
push:
branches-ignore:
- "main"
pull_request:
branches-ignore:
- "main"

jobs:
test:
runs-on: ubuntu-latest
env:
APP_SERVER_URL: ${{ secrets.APP_SERVER_URL }}
TARGET_NETWORK: ${{ secrets.TARGET_NETWORK }}
EVENT_ID: ${{ secrets.EVENT_ID }}
CATEGORY_ID: ${{ secrets.CATEGORY_ID }}
COMMIT_HASH: ${{ secrets.COMMIT_HASH }}
SUPPORTED_WALLETS: ${{ github.sha }}
steps:
- name: ⬇️ Checkout repository
uses: actions/checkout@v3

- name: 🫡 Setup node
uses: actions/setup-node@v1
with:
node-version: 18

- name: 🧘‍♀️ Download dependencies
run: |
cd ui/cip-1694
npm i
- name: 🎳 Run tests
run: |
cd ui
cd cip-1694
npm run jest-test --env=node
- name: 🎳 Build
run: |
cd ui/cip-1694
npm run react-inject-env && npm run build
- name: Upload build
uses: actions/upload-artifact@v3
with:
path: ui/cip-1694/build
44 changes: 0 additions & 44 deletions .github/workflows/ui-cypress-tests.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion ui/cip-1694/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@
},
"scripts": {
"start": "react-scripts start",
"build": "REACT_APP_SERVER_URL= REACT_APP_TARGET_NETWORK= REACT_APP_EVENT_ID= REACT_APP_CATEGORY_ID= REACT_APP_SUPPORTED_WALLETS= npx react-inject-env build react-scripts build",
"build": "react-scripts build",
"jest-test": "jest --config ./jest.config.js",
"react-inject-env": "react-inject-env set",
"eject": "react-scripts eject",
"cypress:open": "cypress open",
"cypress:run": "cypress run",
Expand Down

0 comments on commit 2c3c5f7

Please sign in to comment.