pytss: pin python version to 3.11 to workaround pytss/cryptography bug #137
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: CI | |
on: [push] | |
jobs: | |
pytest: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: sudo apt install -y libpcap-dev libtss2-dev | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- uses: syphar/restore-virtualenv@v1 | |
id: cache-virtualenv | |
# looks for changes in requirements.txt | |
with: | |
requirement_files: requirements.txt | |
- uses: syphar/restore-pip-download-cache@v1 | |
if: steps.cache-virtualenv.outputs.cache-hit != 'true' | |
# the package installation will only be executed when the | |
# requirements-files have changed. | |
- run: pip install --upgrade pip && pip install . && pip install pytest autoflake black isort tpm2_pytss | |
#if: steps.cache-virtualenv.outputs.cache-hit != 'true' | |
- name: Test | |
run: python -m pytest | |
bats: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- name: Install dependencies | |
run: sudo apt install -y libpcap-dev bats | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- uses: syphar/restore-virtualenv@v1 | |
id: cache-virtualenv | |
# looks for changes in requirements.txt | |
with: | |
requirement_files: requirements.txt | |
- uses: syphar/restore-pip-download-cache@v1 | |
if: steps.cache-virtualenv.outputs.cache-hit != 'true' | |
# the package installation will only be executed when the | |
# requirements-files have changed. | |
- run: pip install . | |
#if: steps.cache-virtualenv.outputs.cache-hit != 'true' | |
- name: Test | |
run: bats test/*.bats | |
linters: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: sudo apt install -y libpcap-dev | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- uses: syphar/restore-virtualenv@v1 | |
id: cache-virtualenv | |
# looks for changes in requirements.txt | |
with: | |
requirement_files: requirements.txt | |
- uses: syphar/restore-pip-download-cache@v1 | |
if: steps.cache-virtualenv.outputs.cache-hit != 'true' | |
# the package installation will only be executed when the | |
# requirements-files have changed. | |
- run: pip install .; pip install pytest autoflake black isort | |
#if: steps.cache-virtualenv.outputs.cache-hit != 'true' | |
- name: Linting | |
run: scripts/linters.sh --check |