This repository has been archived by the owner on Jan 2, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
139 lines (124 loc) · 4.2 KB
/
test-desktop.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: Desktop Test
permissions:
contents: write
on:
push:
branches: [main, e2e]
paths:
- frontend/*
- ".github/workflows/test-desktop.yml"
pull_request:
branches: [main, e2e]
paths:
- frontend/*
- ".github/workflows/test-desktop.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
AWS_REGION: us-east-1
jobs:
build-binaries:
name: Test on ${{ matrix.config.os }} @ ${{ matrix.config.arch }}
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- os: macos-latest-xl
arch: x64
goarch: amd64
daemon_name: x86_64-apple-darwin
# - os: macos-latest-xl
# arch: arm64
# goarch: arm64
# daemon_name: aarch64-apple-darwin
# - os: ubuntu-20.04
# arch: x64
# goarch: amd64
# daemon_name: x86_64-unknown-linux-gnu
# - os: windows-latest-l
# arch: x64
# goarch: amd64
# daemon_name: x86_64-pc-windows-msvc
steps:
- name: Checkout
uses: actions/checkout@v1
- uses: ./.github/actions/ci-setup
with:
matrix-os: ${{ matrix.config.os }}
# matrix-target: ${{ matrix.config.daemon_name }}
# matrix-arch: ${{ matrix.config.arch }}
- name: Build Backend (Unix)
if: matrix.config.os != 'windows-latest-l'
run: |
mkdir -p plz-out/bin/backend
go build -o plz-out/bin/backend/mintterd-${{ matrix.config.daemon_name }} ./backend/cmd/mintterd
env:
GOARCH: ${{ matrix.config.goarch }}
CGO_ENABLED: 1
- name: Build Backend (Windows)
if: matrix.config.os == 'windows-latest-l'
run: |
mkdir -p plz-out/bin/backend
go build -o plz-out/bin/backend/mintterd-${{ matrix.config.daemon_name }}.exe ./backend/cmd/mintterd
env:
GOOS: "windows"
GOARCH: ${{ matrix.config.goarch }}
CGO_ENABLED: 1
- name: Set temporal version in package.json
run: |
node scripts/set-desktop-version.mjs
env:
VITE_VERSION: 100.0.0
- name: Build, package & make (Unix)
if: matrix.config.os != 'windows-latest-l'
run: |
yarn desktop:package --arch=${{ matrix.config.arch }}
env:
NODE_ENV: test
DAEMON_NAME: ${{ matrix.config.daemon_name }}
VITE_VERSION: "100.0.0"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
timeout-minutes: 10
VITE_DESKTOP_P2P_PORT: "58000"
VITE_DESKTOP_HTTP_PORT: "58001"
VITE_DESKTOP_GRPC_PORT: "58002"
VITE_DESKTOP_DESKTOP_APPDATA: "Mintter.test"
VITE_DESKTOP_HOSTNAME: "http://localhost"
- name: Build, package and make (Win32)
if: matrix.config.os == 'windows-latest-l'
run: |
$env:DEBUG='electron-osx-sign*,electron-notarize*'
yarn desktop:package --arch=${{ matrix.config.arch }}
env:
NODE_ENV: test
DAEMON_NAME: ${{ matrix.config.daemon_name }}
VITE_VERSION: "100.0.0"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
timeout-minutes: 10
VITE_DESKTOP_P2P_PORT: "58000"
VITE_DESKTOP_HTTP_PORT: "58001"
VITE_DESKTOP_GRPC_PORT: "58002"
VITE_DESKTOP_DESKTOP_APPDATA: "Mintter.test"
VITE_DESKTOP_HOSTNAME: "http://localhost"
- name: Install Playwright Browsers
run: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npx playwright install
- name: Run Tests
run: yarn workspace @mintter/desktop e2e
env:
CI: "1"
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: playwright-report-${{ matrix.config.daemon_name }}
path: frontend/apps/desktop/playwright-report/**/*
# - name: Setup Pages
# uses: actions/configure-pages@v2
# - name: Upload artifact
# uses: actions/upload-pages-artifact@v1
# with:
# # Upload entire repository
# path: playwright-report/
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v1