diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 00000000..dbb1f361 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,24 @@ +name: Coverage +on: [push, pull_request] +jobs: + coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest pytest-cov + pip install -e . + - name: Run tests with coverage + run: | + pytest --cov=tirith tests/ + - name: Upload coverage report + uses: actions/upload-artifact@v3 + with: + name: coverage-report + path: coverage.xml \ No newline at end of file diff --git a/README.md b/README.md index 5fb807bb..786a16e5 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [](https://sonarcloud.io/summary/new_code?id=StackGuardian_policy-framework) [](https://sonarcloud.io/summary/new_code?id=StackGuardian_policy-framework) [](https://join.slack.com/t/stackguardian-ol78820/shared_invite/zt-2ksag36j9-OjmXqQmyXudgYrV6FmesIQ) +[](https://codecov.io/gh/StackGuardian/tirith) # Tirith (StackGuardian Policy Framework)