From 5d73aa2b9d8fb37931a302d9d2114efab86a0e09 Mon Sep 17 00:00:00 2001 From: laurentsimon Date: Mon, 30 Oct 2023 16:40:00 +0000 Subject: [PATCH] update Signed-off-by: laurentsimon --- .github/workflows/pytest.yml | 31 ++++++++++++++++++++++ .github/workflows/scripts/requirements.txt | 22 +++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 .github/workflows/pytest.yml create mode 100644 .github/workflows/scripts/requirements.txt diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml new file mode 100644 index 0000000..42f0e34 --- /dev/null +++ b/.github/workflows/pytest.yml @@ -0,0 +1,31 @@ +name: Run unit tests +on: + pull_request: + branches: [main] + +permissions: {} + +jobs: + model-signing-unit-tests: + name: Run unit tests for signing + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 + with: + python-version: 3.11 + cache: pip + cache-dependency-path: | + .github/workflows/scripts/requirements.txt + - name: Install dependencies + run: | + set -euo pipefail + python -m venv venv + source venv/bin/activate + python -m pip install --require-hashes -r .github/workflows/scripts/requirements.txt + tree venv/ + echo "$PATH" + - name: Run unit tests + run: | + set -euo pipefail + pytest . \ No newline at end of file diff --git a/.github/workflows/scripts/requirements.txt b/.github/workflows/scripts/requirements.txt new file mode 100644 index 0000000..403018e --- /dev/null +++ b/.github/workflows/scripts/requirements.txt @@ -0,0 +1,22 @@ +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# pip-compile --allow-unsafe --generate-hashes --output-file=install/requirements.test.txt install/requirements.test.in +# +iniconfig==2.0.0 \ + --hash=sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3 \ + --hash=sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374 + # via pytest +packaging==23.2 \ + --hash=sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5 \ + --hash=sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7 + # via pytest +pluggy==1.3.0 \ + --hash=sha256:cf61ae8f126ac6f7c451172cf30e3e43d3ca77615509771b3a984a0730651e12 \ + --hash=sha256:d89c696a773f8bd377d18e5ecda92b7a3793cbe66c87060a6fb58c7b6e1061f7 + # via pytest +pytest==7.4.3 \ + --hash=sha256:0d009c083ea859a71b76adf7c1d502e4bc170b80a8ef002da5806527b9591fac \ + --hash=sha256:d989d136982de4e3b29dabcc838ad581c64e8ed52c11fbe86ddebd9da0818cd5 + # via -r install/requirements.test.in