Skip to content

Commit

Permalink
Adding CI test
Browse files Browse the repository at this point in the history
Signed-off-by: Vishnu Challa <[email protected]>
  • Loading branch information
Vishnu Challa committed Aug 1, 2024
1 parent f023a1c commit cf8ee0e
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 4 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/builders.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Builders
on:
workflow_call:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: build and install
run: |
pip install .
23 changes: 23 additions & 0 deletions .github/workflows/ci-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CI tests
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main

jobs:
lint:
uses: ./.github/workflows/pylint.yaml

build:
uses: ./.github/workflows/builders.yaml

tests:
needs: build
uses: ./.github/workflows/tests.yaml
secrets: inherit

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Pylint

on: [push,pull_request]

on:
workflow_call:
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -19,7 +18,6 @@ jobs:
python -m pip install --upgrade pip
pip install pylint
pip install -r requirements.txt
pip install .
- name: Analysing the code with pylint
run: |
pylint -d C0103 -d R0912 $(git ls-files '*/*.py' '*.py')
23 changes: 23 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Execute tests
on:
workflow_call:
jobs:
tests:
runs-on: ubuntu-latest
steps:

- name: Install bats
uses: bats-core/[email protected]
with:
bats-version: 1.10.0
support-install: false
assert-install: false
detik-install: false
file-install: false

- name: Execute Tests
run: |
ls
env:
ES_SERVER: ${{ secrets.ES_SERVER }}
ES_INDEX: ${{ secrets.ES_INDEX }}
8 changes: 8 additions & 0 deletions test.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bats
# vi: ft=bash
# shellcheck disable=SC2086,SC2030,SC2031,SC2164


@test "orion test" {
run_cmd orion --help
}

0 comments on commit cf8ee0e

Please sign in to comment.