Fix example for attaching a file (#33) #111
Workflow file for this run
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: tests | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10", 3.11, 3.12] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install M2Crypto | |
pip install -e . | |
- name: Run tests | |
run: python3 tests.py | |
# As we support both python-magic and file-magic, try them one by one. | |
- name: Test python-magic | |
run: python3 tests.py TestMime.test_libmagic | |
- name: Uninstall python-magic | |
run: pip uninstall python-magic -y | |
- name: Test libmagic missing | |
id: should_fail | |
run: python3 tests.py TestMime.test_libmagic | |
continue-on-error: true | |
- name: Check on failures | |
if: steps.should_fail.outcome != 'failure' | |
run: exit 1 | |
- name: Install file-magic | |
run: pip install file-magic | |
- name: Test file-magic | |
run: python3 tests.py TestMime.test_libmagic |