forked from ONLYOFFICE/OneClickInstall-Workspace
-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (81 loc) · 2.6 KB
/
Copy pathreusable-tests.yml
File metadata and controls
88 lines (81 loc) · 2.6 KB
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
name: Scripts test
on:
workflow_call:
inputs:
author:
description: 'Vagrant boxes distributor'
required: false
type: string
default: 'generic'
distr:
description: 'Distributive thats will be used for tests'
required: true
type: string
ram:
description: 'RAM memory thats will be set for vagrant box'
required: false
type: string
default: '6450'
cpu:
description: 'CPU count thats will be set for vagrant box'
required: false
type: string
default: '4'
jobs:
vagrant-up:
name: "Run tests on ${{ inputs.distr }}"
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python 3.
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Show Vagrant version
run: echo "Print machine ip" && ip a && vagrant --version
- name: Install from production scripts
if: ${{ github.event_name == 'schedule' }}
uses: nick-fields/retry@v2
with:
max_attempts: 2
timeout_minutes: 180
retry_on: error
command: |
cd tests/vagrant
TEST_CASE='--production-install' \
DISTR='${{ inputs.author }}' \
RAM='${{ inputs.ram }}' \
CPU='${{ inputs.cpu }}' \
OS='${{ inputs.distr }}' \
DOWNLOAD_SCRIPT='-ds true' \
ARGUMENTS="-arg '--skiphardwarecheck true --makeswap false'" \
vagrant up
on_retry_command: |
echo "RUN CLEAN UP: Destroy vagrant and one more try"
cd tests/vagrant
sleep 10
vagrant destroy --force
- name: Install from local scripts
if: ${{ github.event_name == 'pull_request' }}
uses: nick-fields/retry@v2
with:
max_attempts: 2
timeout_minutes: 180
retry_on: error
command: |
cd tests/vagrant
TEST_CASE='--local-install' \
DISTR='${{ inputs.author }}' \
RAM='${{ inputs.ram }}' \
CPU='${{ inputs.cpu }}' \
OS='${{ inputs.distr }}' \
DOWNLOAD_SCRIPT='-ds false' \
TEST_REPO='-tr true' \
ARGUMENTS="-arg '--skiphardwarecheck true --makeswap false --localscripts true'" \
vagrant up
on_retry_command: |
echo "RUN CLEAN UP: Destroy vagrant and one more try"
cd tests/vagrant
sleep 10
vagrant destroy --force