Skip to content

Commit fe752f3

Browse files
committed
added github action to run bats testing
1 parent 62e777b commit fe752f3

File tree

4 files changed

+49
-0
lines changed

4 files changed

+49
-0
lines changed

.github/workflows/run-tests.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Run Tests
2+
on: [push]
3+
4+
jobs:
5+
test:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v1
9+
with:
10+
submodules: recursive
11+
- name: install bats
12+
run: yarn
13+
- name: install gg
14+
run: |
15+
sudo mv -fv ./bin/gg /usr/local/bin/gg
16+
chmod -v +x /usr/local/bin/gg
17+
- name: test
18+
run: yarn test

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,24 @@ Install bats with brew (macOS)
6161
brew install bats
6262
```
6363

64+
or with yarn / npm
65+
66+
```bash
67+
yarn install
68+
```
69+
6470
### Running
6571

6672
```bash
6773
bats test
6874
```
6975

76+
or
77+
78+
```bash
79+
yarn test
80+
```
81+
7082
---
7183

7284
🧔 Be sure to checkout [my other repos](https://github.com/csi-lk/) and [website / blog](https://csi.lk)

package.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "gg",
3+
"description": "Aliases and helpers for many git related tasks to speed up my workflow",
4+
"author": "Callum Silcock <[email protected]> (http://www.csi.lk)",
5+
"scripts": {
6+
"test": "yarn bats test"
7+
},
8+
"devDependencies": {
9+
"bats": "^1.1.0"
10+
}
11+
}

yarn.lock

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+
5+
bats@^1.1.0:
6+
version "1.1.0"
7+
resolved "https://registry.yarnpkg.com/bats/-/bats-1.1.0.tgz#6fc44f283ed4e7af2b6ffac93ec5026a1acbdc66"
8+
integrity sha512-1pA29OhDByrUtAXX+nmqZxgRgx2y8PvuZzbLJVjd2dpEDVDvz0MjcBMdmIPNq5lC+tG53G+RbeRsbIlv3vw7tg==

0 commit comments

Comments
 (0)