Skip to content

Commit 8f76d4b

Browse files
committed
CI: Added simple test CI
1 parent 75c24f8 commit 8f76d4b

File tree

3 files changed

+31
-7
lines changed

3 files changed

+31
-7
lines changed

.github/workflows/test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
on: [push, pull_request]
2+
name: Test
3+
jobs:
4+
test:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Install Go
8+
uses: actions/setup-go@v2
9+
with:
10+
go-version: '^1.15.0'
11+
- name: Checkout code
12+
uses: actions/checkout@v2
13+
- name: Install dependencies
14+
run: go install .
15+
- name: Check resources command
16+
run: go run main.go resources --config config/config.example.yaml
17+
- name: Test
18+
run: go test .

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# reka
22
> Never forget that instance running again
33
4+
<br>
5+
6+
[![Build Status](https://github.com/mensaah/reka/workflows/Test/badge.svg)](https://github.com/mensaah/reka/actions)
7+
8+
49
A Cloud Infrastructure Management Tool to stop, resume, clean and destroy resources based on tags
510

611
### Project Name

config/config.example.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ name: reka
99
# Providers to be enabled for reka
1010
providers:
1111
- aws
12+
- gcp
1213
# logPath: /path/to/logs/dir/
1314

1415
# Time to refresh resources in hours
@@ -61,18 +62,18 @@ rules:
6162
startDay: Monday
6263
stopDay: Friday
6364
region: "us-east-2"
64-
- name: Delete all tests instances older than 24hrs (test)
65-
tags:
66-
env: test
67-
ci: true
68-
condition:
69-
terminationPolicy: older than 24hrs
65+
# - name: Delete all tests instances older than 24hrs (test)
66+
# tags:
67+
# env: test
68+
# ci: true
69+
# condition:
70+
# terminationPolicy: older than 24hrs
7071
- name: Nuke all project A instances after Demo october 9th (staging)
7172
tags:
7273
env: staging
7374
project: A
7475
condition:
75-
terminationDate: october 9
76+
terminationDate: "2020-11-05 11:00"
7677
- name: Delete all unused instances older than 48hrs (staging)
7778
tags:
7879
env: staging

0 commit comments

Comments
 (0)