-
Notifications
You must be signed in to change notification settings - Fork 1
114 lines (99 loc) · 2.92 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
name: Test
on: [pull_request]
jobs:
buildtest:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: setup node
uses: actions/setup-node@v1
with:
node-version: 16
- name: install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: 1.79.0
- name: install dependencies (ubuntu only)
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf libdbus-1-dev pkg-config
- name: install app dependencies and build it
run: yarn && yarn tauri build
env:
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
e2etest:
strategy:
fail-fast: false
matrix:
# temporary disable windows-latest on CI
# platform: [ubuntu-20.04, windows-latest]
platform: [ubuntu-20.04]
runs-on: ${{ matrix.platform }}
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v2
- name: install dependencies (ubuntu only)
if: matrix.platform == 'ubuntu-20.04'
run: >-
sudo apt-get update &&
sudo apt-get install -y
libgtk-3-dev
webkit2gtk-4.0
libappindicator3-dev
librsvg2-dev
patchelf
libdbus-1-dev
pkg-config
libgtksourceview-3.0-dev
webkit2gtk-driver
xvfb
libssl-dev
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: 1.79.0
- name: Cargo test
uses: actions-rs/cargo@v1
with:
toolchain: 1.79.0
command: test
args: --manifest-path src-tauri/Cargo.toml
- name: Cargo build
uses: actions-rs/cargo@v1
with:
toolchain: 1.79.0
command: build
args: --release --manifest-path src-tauri/Cargo.toml
- name: setup node
uses: actions/setup-node@v1
with:
node-version: 16
- name: Yarn install
run: yarn install
- name: Install tauri-driver
uses: actions-rs/cargo@v1
with:
command: install
args: tauri-driver
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::191793824713:role/oidc-ownserver-client-gui
aws-region: ap-northeast-1
- name: Download test resources
run: |
aws s3 cp --recursive s3://ownserver-test-resources/${RUNNER_OS} test-resources
- name: WebdriverIO (Ubuntu)
if: matrix.platform == 'ubuntu-20.04'
run: xvfb-run yarn e2etest
- name: WebdriverIO (Windows)
if: matrix.platform == 'windows-latest'
run: yarn e2etest