From 5342a36b36252f5e009500761be30c0029f2928b Mon Sep 17 00:00:00 2001 From: MasloMaslane Date: Sat, 6 Jan 2024 18:29:32 +0100 Subject: [PATCH 1/8] Run tests on self-hosted runner --- .github/workflows/tests-reusable.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests-reusable.yml b/.github/workflows/tests-reusable.yml index 2037c7c..2caf008 100644 --- a/.github/workflows/tests-reusable.yml +++ b/.github/workflows/tests-reusable.yml @@ -10,7 +10,11 @@ on: jobs: test: name: Run tests - runs-on: ubuntu-latest + runs-on: self-hosted + container: + image: debian:latest + options: + --privileged steps: - name: Checkout repository From 8ace9fd376dd597dc2deb0e22bd78b140df39e65 Mon Sep 17 00:00:00 2001 From: MasloMaslane Date: Sat, 6 Jan 2024 18:31:21 +0100 Subject: [PATCH 2/8] Change container image --- .github/workflows/tests-reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-reusable.yml b/.github/workflows/tests-reusable.yml index 2caf008..6471fc9 100644 --- a/.github/workflows/tests-reusable.yml +++ b/.github/workflows/tests-reusable.yml @@ -12,7 +12,7 @@ jobs: name: Run tests runs-on: self-hosted container: - image: debian:latest + image: ubuntu:latest options: --privileged From 02166153c477914e86d4bdb939b2b70cea37d4d8 Mon Sep 17 00:00:00 2001 From: MasloMaslane Date: Sat, 6 Jan 2024 18:33:04 +0100 Subject: [PATCH 3/8] Remove `sudo` usage --- .github/workflows/tests-reusable.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests-reusable.yml b/.github/workflows/tests-reusable.yml index 6471fc9..31262f2 100644 --- a/.github/workflows/tests-reusable.yml +++ b/.github/workflows/tests-reusable.yml @@ -33,8 +33,8 @@ jobs: - name: Install apt dependencies run: | - sudo apt-get update - sudo apt-get install libdb-dev fp-compiler fp-units-base fp-units-math + apt-get update + apt-get install libdb-dev fp-compiler fp-units-base fp-units-math - name: Cache Python dependencies uses: actions/cache@v3 From 00ec0bd34b8d7d7bad3c08909839badd6078587b Mon Sep 17 00:00:00 2001 From: MasloMaslane Date: Sat, 6 Jan 2024 18:34:43 +0100 Subject: [PATCH 4/8] Fix `apt install` --- .github/workflows/tests-reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-reusable.yml b/.github/workflows/tests-reusable.yml index 31262f2..a8f5fab 100644 --- a/.github/workflows/tests-reusable.yml +++ b/.github/workflows/tests-reusable.yml @@ -34,7 +34,7 @@ jobs: - name: Install apt dependencies run: | apt-get update - apt-get install libdb-dev fp-compiler fp-units-base fp-units-math + apt-get install -y libdb-dev fp-compiler fp-units-base fp-units-math - name: Cache Python dependencies uses: actions/cache@v3 From 2de9d2d57d6be87629762fb86d52c02d6ca1516f Mon Sep 17 00:00:00 2001 From: MasloMaslane Date: Sat, 6 Jan 2024 18:36:42 +0100 Subject: [PATCH 5/8] Change `virtualenv` usage --- .github/workflows/tests-reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-reusable.yml b/.github/workflows/tests-reusable.yml index a8f5fab..c4f5b81 100644 --- a/.github/workflows/tests-reusable.yml +++ b/.github/workflows/tests-reusable.yml @@ -52,7 +52,7 @@ jobs: - name: Install Python dependencies run: | pip install --user virtualenv - virtualenv venv + pip -m virtualenv venv . venv/bin/activate pip install -e .[dev] From fc62ee41a72c299b7be0d319f7fa00102790e1de Mon Sep 17 00:00:00 2001 From: MasloMaslane Date: Sat, 6 Jan 2024 18:37:53 +0100 Subject: [PATCH 6/8] Fix `virtualenv` error --- .github/workflows/tests-reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-reusable.yml b/.github/workflows/tests-reusable.yml index c4f5b81..6e8adc6 100644 --- a/.github/workflows/tests-reusable.yml +++ b/.github/workflows/tests-reusable.yml @@ -52,7 +52,7 @@ jobs: - name: Install Python dependencies run: | pip install --user virtualenv - pip -m virtualenv venv + python -m virtualenv venv . venv/bin/activate pip install -e .[dev] From fbc16a586844fbfa5e4c1b1e292c47a907dde9fc Mon Sep 17 00:00:00 2001 From: MasloMaslane Date: Sat, 6 Jan 2024 18:40:21 +0100 Subject: [PATCH 7/8] Add `gcc` installation --- .github/workflows/tests-reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-reusable.yml b/.github/workflows/tests-reusable.yml index 6e8adc6..bbad9d5 100644 --- a/.github/workflows/tests-reusable.yml +++ b/.github/workflows/tests-reusable.yml @@ -34,7 +34,7 @@ jobs: - name: Install apt dependencies run: | apt-get update - apt-get install -y libdb-dev fp-compiler fp-units-base fp-units-math + apt-get install -y libdb-dev fp-compiler fp-units-base fp-units-math build-essential - name: Cache Python dependencies uses: actions/cache@v3 From 60f3c32a7a2dfb1b59fa66c37474f90ba41f7435 Mon Sep 17 00:00:00 2001 From: MasloMaslane Date: Sun, 7 Jan 2024 18:46:13 +0100 Subject: [PATCH 8/8] Add package `ca-certificates` --- .github/workflows/tests-reusable.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests-reusable.yml b/.github/workflows/tests-reusable.yml index bbad9d5..4e25f20 100644 --- a/.github/workflows/tests-reusable.yml +++ b/.github/workflows/tests-reusable.yml @@ -34,7 +34,7 @@ jobs: - name: Install apt dependencies run: | apt-get update - apt-get install -y libdb-dev fp-compiler fp-units-base fp-units-math build-essential + apt-get install -y libdb-dev fp-compiler fp-units-base fp-units-math build-essential ca-certificates - name: Cache Python dependencies uses: actions/cache@v3