From 5b82ab6b5e62986aeba65ded0403a05b255d06ef Mon Sep 17 00:00:00 2001 From: Federico Capoano Date: Sun, 4 Aug 2024 20:57:17 -0400 Subject: [PATCH] [qa] Updated CI, caching of pip deps, minor QA improvements --- .github/workflows/ci.yml | 22 +++++++++++++++++----- README.rst | 3 +-- requirements-qa.txt | 1 + requirements-tests.txt | 1 + 4 files changed, 20 insertions(+), 7 deletions(-) create mode 100644 requirements-qa.txt create mode 100644 requirements-tests.txt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fccb14e9..fff46510 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,11 +35,13 @@ jobs: uses: actions/setup-python@v5 with: python-version: "3.10" + cache: "pip" + cache-dependency-path: "**/requirements*.txt" - name: Installing dependencies run: | yarn install - pip install openwisp-utils[qa] + pip install -r requirements-qa.txt - name: QA checks run: ./run-qa-checks @@ -67,6 +69,8 @@ jobs: run: | yarn install yarn setup + sudo apt update -qq + sudo apt install -qq -y libssl-dev libffi-dev - name: Tests run: yarn coverage @@ -75,10 +79,13 @@ jobs: uses: actions/setup-python@v5 with: python-version: "3.10" + cache: "pip" + cache-dependency-path: "**/requirements*.txt" - name: Get openwisp-radius run: | - curl -L https://github.com/openwisp/openwisp-radius/tarball/master -o openwisp-radius.tar.gz + curl -L https://github.com/openwisp/openwisp-radius/tarball/master \ + -o openwisp-radius.tar.gz tar -xvzf openwisp-radius.tar.gz && mkdir openwisp-radius mv openwisp-*/* openwisp-radius @@ -90,7 +97,10 @@ jobs: - name: Installing OpenWISP Radius run: | - cd openwisp-radius && pip install -U -e ".[saml]" "Django~=4.2.0" + cd openwisp-radius + pip install -U pip setuptools wheel + pip install -U -e ".[saml]" + pip install -U -r requirements-test.txt ./tests/manage.py migrate - name: Creating configuration of organization (supports mobile verification) @@ -104,8 +114,10 @@ jobs: - name: Running OpenWISP Radius run: | - cp browser-test/local_settings.py openwisp-radius/tests/openwisp2/local_settings.py \ - && cd openwisp-radius && ./tests/manage.py runserver & + cp browser-test/local_settings.py \ + openwisp-radius/tests/openwisp2/local_settings.py + cd openwisp-radius + ./tests/manage.py runserver & - name: geckodriver/firefox run: | diff --git a/README.rst b/README.rst index c4635f23..ff9bebde 100644 --- a/README.rst +++ b/README.rst @@ -50,8 +50,7 @@ OpenWISP documentation for a complete overview of features. Documentation ------------- -- `Usage documentation - `_ +- `Usage documentation `_ - `Developer documentation `_ diff --git a/requirements-qa.txt b/requirements-qa.txt new file mode 100644 index 00000000..50c4e74c --- /dev/null +++ b/requirements-qa.txt @@ -0,0 +1 @@ +openwisp-utils[qa] @ https://github.com/openwisp/openwisp-utils/tarball/master diff --git a/requirements-tests.txt b/requirements-tests.txt new file mode 100644 index 00000000..2bdbb1d7 --- /dev/null +++ b/requirements-tests.txt @@ -0,0 +1 @@ +Django~=4.2.0