ci: Supply Chain Hardening #165
Workflow file for this run
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: ci | |
| on: [push, pull_request] | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: [ '3.10', '3.11' ] | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@28f2168f4d98ee0445e3c6321f6e6616c83dd5ec | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install requirements | |
| run: | | |
| python -m pip install --require-hashes -r requirements.txt | |
| pip install . --no-deps | |
| - name: Check source files | |
| if: matrix.python-version == '3.10' | |
| run: | | |
| python -m pip install pytest-pycodestyle==2.3.1 --require-hashes --hash=sha256:dd0060039e12a59b521da8e57e17133c965566dd8d17631e589e7545238829ac | |
| python -m pip install pytest-flakes==4.0.5 --require-hashes --hash=sha256:953134e97215ae31f6879fbd7368c18d43f709dc2fab5b7777db2bb2bac3a924 | |
| py.test --pycodestyle ftw | |
| py.test --flakes ftw | |
| - name: Run tests | |
| run: | | |
| py.test test/unit | |
| py.test test/integration/test_logcontains.py --rule=test/integration/LOGCONTAINSFIXTURE.yaml | |
| py.test test/integration/test_nologcontains.py --rule=test/integration/NOLOGCONTAINSFIXTURE.yaml | |
| py.test test/integration/test_http.py | |
| py.test test/integration/test_cookie.py --rule=test/integration/COOKIEFIXTURE.yaml | |
| py.test test/integration/test_runner.py --rule=test/integration/BASICFIXTURE.yaml |