Skip to content

Commit df69ca3

Browse files
committed
adding an example and a test case
1 parent 122c134 commit df69ca3

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

.github/workflows/build.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
3+
name: CI
4+
on:
5+
push:
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest, macos-latest]
14+
name: Run Example
15+
steps:
16+
- name: Checkout repo
17+
uses: actions/checkout@v2
18+
with:
19+
submodules: recursive
20+
path: ./dotbot-ifplatform
21+
- name: Checkout dotbot
22+
uses: actions/checkout@v2
23+
with:
24+
repository: 'anishathalye/dotbot'
25+
submodules: recursive
26+
path: ./dotbot
27+
- name: Setup Python
28+
uses: actions/setup-python@v2
29+
with:
30+
python-version: 3.x
31+
- name: Run dotbot
32+
run: './dotbot/bin/dotbot -d ./dotbot-ifplatform/example --plugin-dir ./dotbot-ifplatform -c ./dotbot-ifplatform/example/if.yaml'
33+
- name: Check results
34+
if: matrix.os == 'macos-latest'
35+
run: '[[ $(uname -s) == "Darwin" ]] && [[ ! -f ~/ubuntu ]] && [[ -f ~/macos ]] && [[ ! -f ~/anylinux ]]'
36+
shell: bash
37+
- name: Check results
38+
if: matrix.os == 'ubuntu-latest'
39+
run: '[[ $(uname -s) == "Linux" ]] && [[ -f ~/ubuntu ]] && [[ ! -f ~/macos ]] && [[ -f ~/anylinux ]]'
40+
shell: bash
41+
42+
...

example/if.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
- ifubuntu:
2+
- shell:
3+
- touch ~/ubuntu
4+
5+
- ifmacos:
6+
- shell:
7+
- touch ~/macos
8+
9+
- ifanylinux:
10+
- shell:
11+
- touch ~/anylinux

0 commit comments

Comments
 (0)