Skip to content

feat: Order payloads by exploitability and impact #46

feat: Order payloads by exploitability and impact

feat: Order payloads by exploitability and impact #46

Workflow file for this run

name: Docker PyTest
on:
push:
branches: [main]
paths:
- "gtfonow/**"
pull_request:
branches: [main]
paths:
- "gtfonow/**"
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: |
docker build . --file Dockerfile --tag gtfonow_test:${{ matrix.python-version }} --build-arg PYTHON_VERSION=${{ matrix.python-version }}
- name: Run tests
run: |
docker run --name gtfonow_test_${{ matrix.python-version }} -d gtfonow_test:${{ matrix.python-version }}
- name: Run Pytest
run: docker exec gtfonow_test_${{ matrix.python-version }} su -l lowpriv -c "pytest -v --cov=gtfonow --cov-report=xml --cov-report=term-missing"
- name: Copy coverage report from Docker container to host
run: docker cp gtfonow_test_${{ matrix.python-version }}:/home/lowpriv/coverage.xml .
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
files: ./coverage.xml
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}