Fix/cypress tests #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build/release Electron app | |
on: | |
pull_request: | |
branches: | |
- dev | |
push: | |
branches: | |
- main | |
tags: | |
- v*.*.* | |
jobs: | |
cypress-run: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install Dependencies | |
working-directory: "./clients/mercury-layer-base" | |
run: npm install | |
- name: Cypress run | |
working-directory: "./clients/mercury-layer-base" | |
run: | | |
npm run build | |
npm start & | |
npm install cypress | |
npx cypress run --browser chrome | |
release: | |
permissions: write-all | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install Dependencies | |
working-directory: "./clients/react-app" | |
run: npm install | |
- name: build-linux | |
if: matrix.os == 'ubuntu-latest' | |
working-directory: "./clients/react-app" | |
run: | | |
pwd | |
id | |
npm run build:linux | |
- name: build-win | |
if: matrix.os == 'windows-latest' | |
working-directory: "./clients/react-app" | |
run: npm run build:win | |
- name: release | |
uses: softprops/action-gh-release@v1 | |
with: | |
draft: true | |
files: | | |
./clients/react-app/dist/*.exe | |
./clients/react-app/dist/*.zip | |
./clients/react-app/dist/*.dmg | |
./clients/react-app/dist/*.AppImage | |
./clients/react-app/dist/*.snap | |
./clients/react-app/dist/*.deb | |
./clients/react-app/dist/*.rpm | |
./clients/react-app/dist/*.tar.gz | |
./clients/react-app/dist/*.yml | |
./clients/react-app/dist/*.blockmap |