forked from electron-userland/electron-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (101 loc) · 3.72 KB
/
test.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
name: Test
on:
push:
branches:
master
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
build-docker-locally:
type: boolean
description: Force rebuild docker images for CI tests
required: false
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
test-linux:
runs-on: ubuntu-20.04
strategy:
matrix:
testFiles:
- ArtifactPublisherTest,BuildTest,ExtraBuildTest,RepoSlugTest,binDownloadTest,configurationValidationTest,filenameUtilTest,filesTest,globTest,ignoreTest,macroExpanderTest,mainEntryTest,urlUtilTest,extraMetadataTest,linuxArchiveTest,linuxPackagerTest,HoistedNodeModuleTest
- snapTest,debTest,fpmTest,protonTest
steps:
- name: Checkout code repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
with:
fetch-depth: 0
- name: Setup Tests
uses: ./.github/actions/pretest
with:
cache-path: ~/.cache/electron
cache-key: v-11.0.0-linux-electron
- name: Lint
run: pnpm pretest
- name: Determine if Dockerfiles changed
id: changed-files
uses: tj-actions/changed-files@ce4b8e3cba2220de8132ac9721ff754efd6bb7d7 # v34
- name: Dockerfile has changed, rebuild for tests
if: ${{ github.event.inputs.build-docker-locally == 'true' }} || contains(steps.changed-files.outputs.all_changed_files, 'Dockerfile') || contains(steps.changed-files.outputs.all_changed_files, 'docker')
run: pnpm docker-images
- name: Run tests in docker image
run: pnpm test-linux
env:
TEST_FILES: ${{ matrix.testFiles }}
FORCE_COLOR: 1
test-mac:
runs-on: macos-latest
steps:
- name: Checkout code repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- name: Setup Tests
uses: ./.github/actions/pretest
with:
cache-path: ~/Library/Caches/electron
cache-key: v-11.0.0-macos-electron
- name: Test
run: pnpm ci:test
env:
TEST_FILES: masTest,dmgTest,filesTest,macPackagerTest
FORCE_COLOR: 1
# Need to separate from other tests because logic is specific to when TOKEN env vars are set
test-updater:
runs-on: ubuntu-latest
steps:
- name: Checkout code repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- name: Setup Tests
uses: ./.github/actions/pretest
with:
cache-path: ~/Library/Caches/electron
cache-key: v-11.0.0-update-electron
- name: Test
run: pnpm ci:test
env:
TEST_FILES: nsisUpdaterTest,linuxUpdaterTest,PublishManagerTest
KEYGEN_TOKEN: ${{ secrets.KEYGEN_TOKEN }}
BITBUCKET_TOKEN: ${{ secrets.BITBUCKET_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
FORCE_COLOR: 1
test-windows:
runs-on: windows-latest
strategy:
matrix:
testFiles:
- installerTest,appxTest,msiTest,portableTest,assistedInstallerTest,protonTest
- BuildTest,oneClickInstallerTest,winCodeSignTest,winPackagerTest,webInstallerTest
steps:
- name: Checkout code repository
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
- name: Setup Tests
uses: ./.github/actions/pretest
with:
cache-key: v-11.0.0-windows-electron
cache-path: ~\AppData\Local\electron\Cache
- name: Test
run: pnpm ci:test
env:
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
TEST_FILES: ${{ matrix.testFiles }}
FORCE_COLOR: 1