Fix various vulnerabilities (#50) #135
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
# From: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#using-the-python-starter-workflow | |
name: Test | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.9" | |
- name: Install packages | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements.txt | |
python -m pip install -e '.[7z]' | |
- name: Check code format | |
run: python -m black src tests --check --line-length 140 | |
- name: Lint with flake8 | |
run: python -m flake8 . --count --show-source --statistics | |
- name: Test with pytest | |
run: python -m pytest tests --cov=picklescan --doctest-modules --junitxml=junit/test-results.xml --cov-report=xml --cov-report=html | |
- name: Archive test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test | |
path: | | |
htmlcov | |
junit |