Skip to content

Commit

Permalink
Add CI GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rajadain committed Dec 30, 2022
1 parent eb69618 commit 32ffbce
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CI

on:
push:
branches:
- develop
- hotfix/**
- release/**
- test/**
pull_request:
workflow_dispatch:

jobs:
build:
# We use this virtual environment because it supports nested virtualization.
# See https://github.com/actions/virtual-environments/issues/433 for more
# information
runs-on: macos-12
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Cache Vagrant boxes
# Caches that are not accessed within the last week will be evicted
# (see https://github.com/actions/cache#cache-limits)
uses: actions/cache@v3
with:
path: ~/.vagrant.d/boxes
key: ${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }}
restore-keys: |
${{ runner.os }}-vagrant-
- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: Set up Ansible
run: pip3 install ansible

- name: Vagrant base box update
run: vagrant box update

- name: Vagrant up
run: ./scripts/vagrant-up.sh

- name: Test
run: ./scripts/test.sh

- name: Halt the VM
run: vagrant halt

0 comments on commit 32ffbce

Please sign in to comment.