Skip to content

Commit

Permalink
add rigby github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
BK1031 committed Apr 16, 2024
1 parent 1ad23f9 commit 2215c9c
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Mapache Tests
run-name: Triggered by ${{ github.event_name }} to ${{ github.ref }} by @${{ github.actor }}

on:
push:

jobs:
rigby_test_job:
runs-on: ubuntu-latest
name: Test Rigby
defaults:
run:
working-directory: ./rigby
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Setup Python
uses: actions/[email protected]
with:
python-version: '3.10.10'
- name: Install poetry
run: |
python -m pip install poetry
- name: Configure poetry
run: |
python -m poetry config virtualenvs.in-project true
- name: Install dependencies
run: |
python -m poetry install
- name: Run tests
run: |
python -m poetry run test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./coverage.lcov
verbose: true
1 change: 1 addition & 0 deletions rigby/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pip-delete-this-directory.txt
htmlcov/
.tox/
.nox/
coverage.lcov
.coverage
.coverage.*
.cache
Expand Down
2 changes: 1 addition & 1 deletion rigby/tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ def main():
If an error occurs, exit with the corresponding return code.
Prints all outputs to stdout.
"""
command = "pytest --debug --cov=rigby --cov-report=term-missing --cov-report=html --cov-config=pyproject.toml --full-trace".split()
command = "pytest --debug --cov=rigby --cov-report=term-missing --cov-report=html --cov-report=lcov --cov-config=pyproject.toml --full-trace -v -s".split()
result = subprocess.run(command, capture_output=True)
print(result.stdout.decode('utf8'), end='')
print(result.stderr.decode('utf8'), end='')
Expand Down

0 comments on commit 2215c9c

Please sign in to comment.