From 481c761c2030d54a815a575223ec941ffd0101f6 Mon Sep 17 00:00:00 2001 From: David Cook Date: Thu, 29 Feb 2024 10:15:05 -0600 Subject: [PATCH 1/3] Use Sage container image in CI --- .github/workflows/test.yml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 83e9f2da..e60c834d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,18 +16,11 @@ jobs: test: name: "Run unit tests for reference code" runs-on: ubuntu-latest + container: sagemath/sagemath:latest steps: - name: Checkout uses: actions/checkout@v3 - with: - submodules: true - - - name: Install Sage - run: | - sudo apt-get update - sudo apt-get install -y sagemath python3-cffi - sage -pip install pycryptodomex - name: Run tests working-directory: poc - run: make test + run: sage -python -m unittest From bec642c994dc4f47fe59a7e5ce420a91a741afa0 Mon Sep 17 00:00:00 2001 From: David Cook Date: Thu, 29 Feb 2024 10:20:12 -0600 Subject: [PATCH 2/3] Run as root in the container --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e60c834d..23cc96ef 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,9 @@ jobs: test: name: "Run unit tests for reference code" runs-on: ubuntu-latest - container: sagemath/sagemath:latest + container: + image: sagemath/sagemath:latest + options: --user root steps: - name: Checkout uses: actions/checkout@v3 From 39db3a31daaf0bbe3ca3155ebd9529696e78202c Mon Sep 17 00:00:00 2001 From: David Cook Date: Thu, 29 Feb 2024 10:31:54 -0600 Subject: [PATCH 3/3] Install PyCryptodome --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 23cc96ef..e7122845 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,6 +23,9 @@ jobs: - name: Checkout uses: actions/checkout@v3 + - name: Install dependencies + run: sage --pip install pycryptodomex + - name: Run tests working-directory: poc run: sage -python -m unittest