-
Notifications
You must be signed in to change notification settings - Fork 6
124 lines (107 loc) · 3.77 KB
/
nightly-build.yaml
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
name: Nightly build
on:
schedule:
- cron: '0 0 * * 1-6'
workflow_dispatch:
inputs: {}
permissions:
contents: write
defaults:
run:
shell: bash
jobs:
test-e2e:
strategy:
fail-fast: false
matrix:
include:
- name: Chrome
project: chrome
target: chrome
runs-on: ubuntu-22.04
- name: Edge
project: msedge
target: chrome
runs-on: ubuntu-22.04
timeout-minutes: 15
name: E2E Tests - ${{ matrix.name }}
runs-on: ${{ matrix.runs-on }}
environment: test
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Environment setup
uses: ./.github/actions/setup
- name: Build
run: pnpm build ${{ matrix.target }} --channel=nightly
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Run Playwright tests
run: pnpm test:e2e:${{ matrix.project }}
env:
PLAYWRIGHT_PROJECT: ${{ matrix.project }}
PW_EXPERIMENTAL_SERVICE_WORKER_NETWORK_EVENTS: '1'
TEST_WALLET_ORIGIN: ${{ vars.E2E_WALLET_URL_ORIGIN }}
TEST_WALLET_USERNAME: ${{ vars.E2E_WALLET_USERNAME }}
TEST_WALLET_PASSWORD: ${{ secrets.E2E_WALLET_PASSWORD }}
TEST_WALLET_ADDRESS_URL: ${{ vars.E2E_CONNECT_WALLET_ADDRESS_URL }}
TEST_WALLET_KEY_ID: ${{ vars.E2E_CONNECT_KEY_ID }}
TEST_WALLET_PUBLIC_KEY: ${{ secrets.E2E_CONNECT_PUBLIC_KEY }}
TEST_WALLET_PRIVATE_KEY: ${{ secrets.E2E_CONNECT_PRIVATE_KEY }}
FYNBOS_WALLET_ADDRESS_URL: ${{ vars.E2E_FYNBOS_WALLET_ADDRESS_URL }}
FYNBOS_USERNAME: ${{ vars.E2E_FYNBOS_USERNAME }}
FYNBOS_PASSWORD: ${{ secrets.E2E_FYNBOS_PASSWORD }}
CHIMONEY_WALLET_ORIGIN: ${{ vars.E2E_CHIMONEY_WALLET_URL_ORIGIN }}
CHIMONEY_WALLET_ADDRESS_URL: ${{ vars.E2E_CHIMONEY_WALLET_ADDRESS_URL }}
CHIMONEY_USERNAME: ${{ vars.E2E_CHIMONEY_USERNAME }}
CHIMONEY_PASSWORD: ${{ secrets.E2E_CHIMONEY_PASSWORD }}
- name: Encrypt report
shell: bash
working-directory: tests/e2e/playwright-report
run: |
zip -r -P ${{ secrets.E2E_PLAYWRIGHT_REPORT_PASSWORD }} ../playwright-report.zip *
- name: Upload report
uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report-${{ matrix.project }}
path: tests/e2e/playwright-report.zip
retention-days: 3
build-nightly:
name: Create Release
runs-on: ubuntu-24.04
needs: test-e2e
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Environment setup
uses: ./.github/actions/setup
- name: Build
run: pnpm build --channel=nightly
- name: Get built version
uses: actions/github-script@v7
id: version
with:
script: |
const script = require('./.github/actions/get-built-version.cjs')
await script({ github, context, core })
- name: Delete existing release
run: gh release delete nightly --cleanup-tag --yes
continue-on-error: true
env:
GH_TOKEN: ${{ github.token }}
- name: Create GH Release
uses: softprops/action-gh-release@v2
with:
files: |
dist/*.zip
tag_name: 'nightly'
name: Nightly ${{ steps.version.outputs.version }}
body: |
> [!warning]
> The Nightly build is for adventurous folks. It's updated daily with less-tested features and improvements.
prerelease: true
- name: Ensure release is published
run: gh release edit nightly --draft=false
env:
GH_TOKEN: ${{ github.token }}