Skip to content

Fix CI

Fix CI #48

Workflow file for this run

name: Vagrant Tests
on:
workflow_dispatch:
pull_request:
# types: [ready_for_review]
jobs:
test:
strategy:
fail-fast: False
matrix:
os: ['centos-7', 'ubuntu-1804', 'ubuntu-1804-headless']
# os: ['ubuntu-1804', 'ubuntu-2204', 'centos-7', 'centos-8']
name: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- name: Install pre requisites
run: sudo apt update && 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: Debug
run: |
ls -ld /opt
ls -ld /usr
ls -ld /usr/lib
ls -ld /usr/lib/virtualbox
sudo chown root:root /usr
sudo chown root:root /usr/lib
sudo chown root:root /usr/lib/virtualbox
# - name: Free Disk Space (Ubuntu)
# uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # [email protected]
# with:
# # this might remove tools that are actually needed,
# # when set to "true" but frees about 6 GB
# tool-cache: true
- name: Checkout code
uses: actions/checkout@v3
- name: Cache Vagrant boxes
uses: actions/cache@v2
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: Run vagrant up
run: |
export VAGRANT_VAGRANTFILE=Vagrantfile.${{ matrix.os }}
vagrant up
- name: Check for errors
run: |
export VAGRANT_VAGRANTFILE=Vagrantfile.${{ matrix.os }}
vagrant up
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 && \
rose version && \
fcm version && \
svn --version && \
gfortran --version | grep 4.8.5 || fcm test-battery t/fcm-make && \
fcm test-battery t/fcm-conflicts && \
which at"