Skip to content

Merge pull request #161 from domain-protect/prd-environment #565

Merge pull request #161 from domain-protect/prd-environment

Merge pull request #161 from domain-protect/prd-environment #565

Workflow file for this run

name: Formatting and Unit Tests
on:
push:
env:
TERRAFORM_DOCS_VERSION: v0.19.0
jobs:
unit_tests:
name: Unit Test
runs-on: ubuntu-latest
permissions:
checks: write # Required for Publish Test Results
pull-requests: write # Required for Publish Test Results
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Set up Python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5
with:
python-version-file: '.python-version'
cache: 'pip' # caching pip dependencies
- run: pip install -r requirements-dev.txt
- name: Install terraform-docs
uses: jaxxstorm/action-install-gh-release@7f2440a9a41f74262d8f6433da138c799799a969 # v1.13.0
with:
repo: terraform-docs/terraform-docs
tag: ${{ env.TERRAFORM_DOCS_VERSION }}
- name: Linting and formatting
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
with:
extra_args: --all-files --show-diff-on-failure
- name: Unit tests
run: |
pytest --cov=manual_scans --cov=utils --cov-branch --cov-fail-under=15 unittests
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@170bf24d20d201b842d7a52403b73ed297e6645b # v2
if: always()
with:
files: "test_reports/*.xml"