Skip to content

Merge pull request #20 from mauricelambert/dev #367

Merge pull request #20 from mauricelambert/dev

Merge pull request #20 from mauricelambert/dev #367

Workflow file for this run

name: WebScripts Tests
on: [push]
jobs:
build:
strategy:
matrix:
python-version: [3.9, "3.10", "3.11", "3.12"]
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
name: "Run test on ${{ matrix.os }} with ${{ matrix.python-version }}"
runs-on: "${{ matrix.os }}"
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Test WebScripts with unittest
run: |
mkdir WebScripts/hardening
echo "{}" > WebScripts/hardening/logs_checks.json
echo "{}" > WebScripts/hardening/uploads_file_integrity.json
echo "{}" > WebScripts/hardening/webscripts_file_integrity.json
echo "{}" > WebScripts/hardening/audit.html
echo "{}" > WebScripts/hardening/audit.txt
echo "{}" > WebScripts/hardening/audit.json
python -m unittest discover -s test -p Test*.py -v
python -c "import json as j,os;f=os.path.join('WebScripts','config','server.json');d=j.load(open(f));d['server']['force_file_permissions']=False;j.dump(d,open(f,'w'))"
python -c "import os;f=os.path.join('WebScripts','WebScripts.py');d=open(f).read().replace('force_file_permissions = True','force_file_permissions=False');open(f,'w').write(d)"
python -m WebScripts --test-running --security
python -m pip install .
python -m WebScripts.harden -o `whoami` -p 'abc' -d '.'
python --version | grep " 3.12" && python -m pip install setuptools
python setup.py install --admin-password=abc --directory=.