Skip to content

Commit

Permalink
adding an example and a test case
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbanerje committed Sep 14, 2021
1 parent 122c134 commit df69ca3
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---

name: CI
on:
push:
pull_request:

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
name: Run Example
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
submodules: recursive
path: ./dotbot-ifplatform
- name: Checkout dotbot
uses: actions/checkout@v2
with:
repository: 'anishathalye/dotbot'
submodules: recursive
path: ./dotbot
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Run dotbot
run: './dotbot/bin/dotbot -d ./dotbot-ifplatform/example --plugin-dir ./dotbot-ifplatform -c ./dotbot-ifplatform/example/if.yaml'
- name: Check results
if: matrix.os == 'macos-latest'
run: '[[ $(uname -s) == "Darwin" ]] && [[ ! -f ~/ubuntu ]] && [[ -f ~/macos ]] && [[ ! -f ~/anylinux ]]'
shell: bash
- name: Check results
if: matrix.os == 'ubuntu-latest'
run: '[[ $(uname -s) == "Linux" ]] && [[ -f ~/ubuntu ]] && [[ ! -f ~/macos ]] && [[ -f ~/anylinux ]]'
shell: bash

...
11 changes: 11 additions & 0 deletions example/if.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- ifubuntu:
- shell:
- touch ~/ubuntu

- ifmacos:
- shell:
- touch ~/macos

- ifanylinux:
- shell:
- touch ~/anylinux

0 comments on commit df69ca3

Please sign in to comment.