Update cwe2stix-bundle-structure.jpg (#31) #30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Run Tests | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| jobs: | |
| test-pipeline: | |
| runs-on: ubuntu-latest | |
| environment: test_pipeline | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Unit tests | |
| id: unit_tests | |
| run: | | |
| pip install -r requirements.txt pytest pytest-cov | |
| export PYTHONPATH=. | |
| pytest --cov --cov-branch --cov-report=xml --junitxml=junit.xml -o junit_family=legacy tests/ | |
| - name: Upload coverage reports to Codecov | |
| id: upload_unit_test_coverage | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Upload test results to Codecov | |
| id: upload_unit_test_results | |
| if: ${{ !cancelled() }} | |
| uses: codecov/test-results-action@v1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} |