Install pytest in Github actions #2
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: Tests | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install build dependencies | |
| run: sudo apt-get update && sudo apt-get install -y git cmake ninja-build build-essential python3 gcc | |
| - name: Build and install liboqs and its Python bindings | |
| run: | | |
| git clone --depth=1 https://github.com/open-quantum-safe/liboqs-python | |
| cd liboqs-python | |
| pip install . | |
| - name: Install Python dependencies | |
| run: | | |
| pip install -r requirements.txt | |
| pip install pytest | |
| - name: Run tests | |
| run: pytest --maxfail=1 --disable-warnings -q |