-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
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
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 |