-
Notifications
You must be signed in to change notification settings - Fork 14
67 lines (59 loc) · 2.15 KB
/
tests.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
name: Vagrant Tests
on:
workflow_dispatch:
pull_request:
# types: [ready_for_review]
jobs:
test:
strategy:
fail-fast: False
matrix:
os: ['ubuntu-1804-headless', 'ubuntu-2204-headless', 'centos-8']
name: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- name: Install pre requisites
run: sudo apt install virtualbox vagrant
- name: Open up network interfaces for VM
run: |
sudo mkdir -p /etc/vbox/
sudo touch /etc/vbox/networks.conf
sudo sh -c "echo '* 192.168.0.0/16' > /etc/vbox/networks.conf"
sudo sh -c "echo '* 3001::/64' >> /etc/vbox/networks.conf"
- name: Checkout code
uses: actions/checkout@v4
- name: Cache Vagrant boxes
uses: actions/cache@v4
with:
path: ~/.vagrant.d/boxes
key: ${{ runner.os }}-vagrant-${{ matrix.os }}
restore-keys: |
${{ runner.os }}-vagrant-${{ matrix.os }}
- name: Show Vagrant version
run: vagrant --version
# - name: Free up space
# run: |
# df -h
# sudo rm -rf /usr/share/dotnet /usr/local/lib/android
# df -h
- name: Run vagrant up
run: |
export VAGRANT_VAGRANTFILE=Vagrantfile.${{ matrix.os }}
vagrant up
- name: Check for errors
run: |
export VAGRANT_VAGRANTFILE=Vagrantfile.${{ matrix.os }}
vagrant ssh -c "grep 'errors occurred during installation' /var/log/install.log || true"
vagrant ssh -c "grep -q 'No errors detected' /var/log/install.log && \
cylc version --long && \
CYLC_VERSION=8 cylc version --long && \
rose version && \
CYLC_VERSION=8 rose version && \
fcm version && \
svn --version && \
fcm test-battery t/fcm-make && \
which at"
- name: Test fcm conflicts
run: |
export VAGRANT_VAGRANTFILE=Vagrantfile.${{ matrix.os }}
vagrant ssh -c "fcm test-battery t/fcm-conflicts"