Token page #152
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: Test | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v3 | |
- name: Install Bun package manager | |
uses: oven-sh/setup-bun@v1 | |
- name: Install NPM dependencies | |
run: bun install | |
- name: Use Node.js for vitest | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
- name: Run test scripts of all workspaces in parallel | |
run: bun run test | |
generate-lockfile: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v3 | |
- name: Install Bun package manager | |
uses: oven-sh/setup-bun@v1 | |
- name: Install NPM dependencies | |
run: bun install --yarn | |
- name: Upload yarn.lock | |
uses: actions/upload-artifact@v3 | |
with: | |
name: lockfile | |
path: ${{ github.workspace }}/yarn.lock | |
build-electron-app-unix: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest] | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v3 | |
- name: Install Bun package manager | |
uses: oven-sh/setup-bun@v1 | |
- name: Install NPM dependencies | |
run: bun install | |
- name: Extract platform name | |
id: get-os | |
run: echo "os=$(echo ${{ matrix.os }} | cut -d- -f1)" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Building desktop wallet on ${{ steps.get-os.outputs.os }} | |
run: cd apps/desktop-wallet && bun run ci:build:electron:${{ steps.get-os.outputs.os }} | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build-electron-app-windows: | |
runs-on: windows-latest | |
needs: generate-lockfile | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v3 | |
- name: Download yarn.lock | |
uses: actions/download-artifact@v3 | |
with: | |
name: lockfile | |
path: ${{ github.workspace }} | |
- name: Use yarn since bun is not available on Windows | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
- name: Delete bun lockfile because it creates problems with yarn | |
run: rm bun.lockb | |
- name: Change packageManager field in package.json from bun to yarn | |
uses: jossef/[email protected] | |
with: | |
file: package.json | |
field: packageManager | |
value: [email protected] | |
- name: Install NPM dependencies | |
run: yarn install --network-timeout 100000 | |
- name: Compile shared package | |
run: cd packages/shared && yarn run compile | |
- name: Building desktop wallet on Windows | |
run: cd apps/desktop-wallet && yarn run build && yarn run build:electron:windows | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |