Check End-to-End #90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# SPDX-license-identifier: Apache-2.0 | |
############################################################################## | |
# Copyright (c) 2022 | |
# All rights reserved. This program and the accompanying materials | |
# are made available under the terms of the Apache License, Version 2.0 | |
# which accompanies this distribution, and is available at | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
############################################################################## | |
name: Check End-to-End | |
# yamllint disable-line rule:truthy | |
on: | |
push: | |
paths: | |
- '**.yml' | |
- '**/Dockerfile' | |
- '**.sh' | |
- '!.github/*' | |
pull_request_review: | |
types: | |
- submitted | |
schedule: | |
- cron: '0 0 * * 5' | |
jobs: | |
check-ci-vm: | |
name: Check E2E deployment on Ubuntu Bionic Virtual Machine | |
if: >- | |
( | |
github.event_name == 'pull_request_review' && | |
github.event.review.state == 'approved' | |
) || | |
github.event_name != 'pull_request_review' | |
runs-on: macos-12 | |
steps: | |
- uses: actions/checkout@v4.2.2 | |
- name: Cache Vagrant boxes | |
uses: actions/cache@v4.2.0 | |
with: | |
path: ~/.vagrant.d/boxes | |
key: ${{ runner.os }}-vagrant-ubuntu-bionic-${{ hashFiles('Vagrantfile') }} | |
restore-keys: | | |
${{ runner.os }}-vagrant-ubuntu-bionic- | |
- name: Apply workaround for VBoxHeadless issue on macOS (https://www.virtualbox.org/ticket/20636) | |
shell: bash | |
run: | | |
if [[ "$(VBoxManage --version)" == "6.1.28r147628" ]]; then | |
find . -type f -iname "Vagrantfile" -exec sed -i '.bak' 's|v.gui = .*|v.gui = true|g' {} \; | |
find . -type f -name "*.bak" -delete | |
fi | |
- name: Replace shorten links | |
run: | | |
find . -type f -exec sed -i '.bak' 's|http://bit.ly/install_pkg|https://raw.githubusercontent.com/electrocucaracha/pkg-mgr_scripts/master/install.sh|g' {} \; | |
find . -type f -name "*.bak" -delete | |
- name: Install vagrant tool | |
run: brew install vagrant | |
- name: Deploy Virtual Machine | |
env: | |
VAGRANT_DISABLE_VBOXSYMLINKCREATE: 1 | |
run: vagrant up | |
check-baremetal: | |
name: Check E2E deployment on Ubuntu Bionic Virtual Environment | |
if: >- | |
( | |
github.event_name == 'pull_request_review' && | |
github.event.review.state == 'approved' | |
) || | |
github.event_name != 'pull_request_review' | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4.2.2 | |
- name: Install dependencies | |
run: pip install docker-compose | |
- name: Configure environment | |
run: | | |
docker swarm init --advertise-addr 10.0.2.15 | |
docker build --no-cache -t vpp:21.10.1 --build-arg VERSION=21.10.1 vpp/ | |
docker-compose up -d | |
- name: Check docker logs | |
if: always() | |
run: docker-compose logs | |
- name: Check traffic sink page | |
run: curl localhost:667 |