-
Notifications
You must be signed in to change notification settings - Fork 3
69 lines (59 loc) · 2.28 KB
/
pipeline.yml
File metadata and controls
69 lines (59 loc) · 2.28 KB
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
68
69
name: CI
on: [push]
jobs:
validate:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v1
- name: Init & Update Submodules
run: git submodule update --init --recursive --remote
- name: Install Pre-Requisites macOS
if: startsWith(runner.os, 'macOS')
run: |
brew install --cask multipass
brew install coreutils
brew install bats
alias readlink=greadlink
- name: Install Pre-Requisites Linux
if: startsWith(runner.os, 'Linux')
run: |
sudo apt-get update -y
sudo apt-get install -y bats
sudo snap install multipass --classic
sudo snap install docker
- name: Install Pre-Requisites Windows
if: startsWith(runner.os, 'Windows')
run: |
iwr -useb get.scoop.sh | iex
#echo "::add-path::C:\Users\runneradmin\scoop\shims"
Join-Path (Resolve-Path ~).Path "scoop\shims" >> $Env:GITHUB_PATH
npm install -g bats
scoop install git
scoop install docker
scoop install docker-compose
## Not the ci/check_bats.bash do not send the failures to the GitHub Actions
- name: Test
shell: bash
run: |
ci/check_bats.bash unit
ci/check_bats.bash integration
### @TODO: Test suite for Docker yet to be ported for Mac & Windows
### Its due to the Limitation of GitHub Default Runners
### Mac: https://github.community/t5/GitHub-Actions/Why-is-Docker-not-installed-on-macOS/m-p/39364
### Windows : https://github.community/t5/GitHub-Actions/How-to-use-Linux-Docker-container-on-Windows-VM/m-p/38535
### Paid Self Hosted Runner is Required - so the Technical Debit is Parked
- name: Docker Integration Test (Linux)
if: startsWith(runner.os, 'Linux')
run: |
ci/check_bats.bash host_precondition
ci/check_bats.bash host_docker_precondition
ci/check_bats.bash docker
- name: Docker Integration Test (Windows)
if: startsWith(runner.os, 'Windows')
shell: bash
run: |
ci/check_bats.bash host_docker_precondition