Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 23 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,6 @@ jobs:
name: Python==${{ matrix.python-version }} | ${{ matrix.django-version }}
runs-on: ubuntu-22.04

services:
redis:
image: redis
ports:
- 6379:6379
postgres:
image: postgis/postgis:13-3.3-alpine
env:
POSTGRES_PASSWORD: openwisp2
POSTGRES_USER: openwisp2
POSTGRES_DB: openwisp2
ports:
- 5432:5432

strategy:
fail-fast: false
matrix:
Expand All @@ -46,6 +32,19 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Cache APT packages
uses: actions/cache@v4
with:
path: /var/cache/apt/archives
key: apt-${{ runner.os }}-${{ hashFiles('.github/workflows/ci.yml') }}
restore-keys: |
apt-${{ runner.os }}-

- name: Disable man page auto-update
run: |
echo 'set man-db/auto-update false' | sudo debconf-communicate >/dev/null
sudo dpkg-reconfigure man-db

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand All @@ -54,19 +53,6 @@ jobs:
cache-dependency-path: |
**/requirements*.txt

- uses: browser-actions/setup-chrome@v1
# Using a fixed version, see here for more information on why:
# https://github.com/openwisp/openwisp-controller/issues/902#issuecomment-2266219715
# TODO: find a solution to allow using recent versions
with:
chrome-version: 125
install-chromedriver: true
id: setup-chrome

- run: |
${{ steps.setup-chrome.outputs.chrome-path }} --version
chromedriver --version

- name: Install Dependencies
id: deps
run: |
Expand All @@ -78,8 +64,13 @@ jobs:
pip install -U pip wheel setuptools
pip install -U -r requirements-test.txt
pip install -U -e .
pip install -UI --no-deps https://github.com/openwisp/openwisp-utils/tarball/browser-logs
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: Remove this before merging

Suggested change
pip install -UI --no-deps https://github.com/openwisp/openwisp-utils/tarball/browser-logs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove this now.

pip install ${{ matrix.django-version }}

- name: Start postgres and redis
if: ${{ !cancelled() && steps.deps.conclusion == 'success' }}
run: docker compose up -d postgres redis

- name: QA checks
run: ./run-qa-checks

Expand All @@ -96,7 +87,11 @@ jobs:
coverage xml
env:
SELENIUM_HEADLESS: 1
CHROME_BIN: ${{ steps.setup-chrome.outputs.chrome-path }}
GECKO_LOG: 1

- name: Show gecko web driver log on failures
if: ${{ failure() }}
run: cat geckodriver.log

- name: Upload Coverage
if: ${{ success() }}
Expand Down
Loading
Loading