Simplify search for iptables executable (#382) #332
This file contains 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: OpenCanary Tests | |
on: | |
- "push" | |
jobs: | |
precommit_tests: | |
runs-on: "ubuntu-20.04" | |
steps: | |
- name: "Check out repository code" | |
uses: "actions/checkout@v3" | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install pre-commit | |
run: pip install pre-commit | |
- name: Check pre-commit is happy | |
run: pre-commit run --all-files | |
opencanary_tests: | |
strategy: | |
matrix: | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] | |
os: ["ubuntu-20.04", "ubuntu-22.04", "macos-12", "macos-13", "macos-14"] | |
exclude: | |
- os: "macos-14" | |
python-version: "3.7" | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: "Check out repository code" | |
uses: "actions/checkout@v3" | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- name: Install setuptools | |
run: pip3 install setuptools>=63.2.0 | |
- name: Install wheel | |
run: pip3 install wheel | |
- name: Create package | |
run: python3 setup.py sdist | |
- name: Install package | |
run: pip3 install dist/opencanary-*.tar.gz | |
- name: Install test dependencies | |
run: pip3 install -r opencanary/test/requirements.txt | |
- name: Copy config file | |
run: cp opencanary/test/opencanary.conf . | |
- name: Start OpenCanary | |
run: opencanaryd --start | |
- name: Run Pytest | |
run: pytest -s |