-
Notifications
You must be signed in to change notification settings - Fork 63
93 lines (87 loc) · 3.05 KB
/
build.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
name: 'build-test'
on:
push:
branches-ignore:
- master
workflow_call:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
node-version-file: 'package.json'
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- run: pnpm lint
- run: pnpm test
- run: pnpm build
- run: pnpm package
- uses: actions/upload-artifact@v4
with:
name: dist
path: ./dist/
test:
needs: [build]
strategy:
matrix:
os: [ubuntu, macos, windows]
version: ["", 1295939, 120, dev]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/download-artifact@v4
with:
name: dist
- name: Install Google Chrome
uses: ./
with:
chrome-version: ${{ matrix.version }}
install-chromedriver: true
id: setup-chrome
- if: runner.os == 'Linux' || runner.os == 'macOS'
run: |
"${{ steps.setup-chrome.outputs.chrome-path }}" --version
"${{ steps.setup-chrome.outputs.chromedriver-path }}" --version
- if: runner.os == 'Windows'
run: |
(Get-Item (Get-Command "${{ steps.setup-chrome.outputs.chrome-path }}").Source).VersionInfo.ProductVersion
(Get-Item (Get-Command "${{ steps.setup-chrome.outputs.chromedriver-path }}").Source).VersionInfo.ProductVersion
test-install-dependencies:
needs: [build]
strategy:
fail-fast: false
matrix:
container:
- ""
- fedora
- opensuse/leap
runs-on: ubuntu-latest
container: ${{ matrix.container }}
steps:
- uses: actions/download-artifact@v4
with:
name: dist
- name: Install action dependencies
run: apt-get update && apt-get install -y unzip
if: ${{ matrix.container == 'debian' || matrix.container == 'ubuntu' || matrix.container == 'linuxmintd/mint21-amd64' }}
- name: Install action dependencies
run: yum install --assumeyes unzip
if: ${{ matrix.container == 'redhat/ubi9' || matrix.container == 'oraclelinux:9' || matrix.container == 'fedora' }}
- name: Install action dependencies
run: zypper install --no-confirm unzip
if: ${{ matrix.container == 'opensuse/leap' || matrix.container == 'registry.suse.com/bci/bci-base:15.5' }}
# Override GITHUB_PATH by the current PATH to prevent the issue discussed in https://github.com/actions/runner/issues/3210
- run: echo "$PATH" >>"$GITHUB_PATH"
if: ${{ matrix.container == 'opensuse/leap' || matrix.container == 'registry.suse.com/bci/bci-base:15.5' }}
- name: Install Google Chrome
uses: ./
with:
chrome-version: 120
install-chromedriver: true
install-dependencies: true
id: setup-chrome
- run: |
"${{ steps.setup-chrome.outputs.chrome-path }}" --version
"${{ steps.setup-chrome.outputs.chromedriver-path }}" --version