Skip to content

Merge pull request #1525 from nextcloud/fix/sibscribe_to_news-change-… #6295

Merge pull request #1525 from nextcloud/fix/sibscribe_to_news-change-…

Merge pull request #1525 from nextcloud/fix/sibscribe_to_news-change-… #6295

name: Analysis & Coverage
on:
pull_request:
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11']
db-type: [postgres, sqlite]
exclude:
- python-version: '3.10'
db-type: 'sqlite'
services:
postgres:
image: postgres:14
env:
POSTGRES_USER: postgres
POSTGRES_DB: nextcloudappstore
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install dependencies
run: sudo apt install gettext netcat-openbsd xvfb redis-server
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: pip install poetry==1.6.1
- uses: browser-actions/setup-firefox@latest
with:
firefox-version: latest
- name: Set up Geckodriver
uses: browser-actions/setup-geckodriver@latest
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Make dev-setup
run: |
make dev-setup db="${{ matrix.db-type }}" venv_bin=""
make l10n venv_bin=""
npm install tslint
- name: Linter
run: ./node_modules/.bin/tslint "./nextcloudappstore/core/static/assets/**/*.ts"
- name: Generate coverage report
run: |
xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x8" make test venv_bin=""
make coverage venv_bin=""
- name: Upload Codecov to artifacts
uses: actions/upload-artifact@v4
with:
name: coverage_${{ matrix.python-version }}_${{ matrix.db-type }}.xml
path: coverage.xml
if-no-files-found: error
upload-codecov:
needs: [ test ]
permissions:
contents: none
runs-on: ubuntu-22.04
name: Upload Coverage
steps:
- uses: actions/checkout@v4
- name: Download Coverage Artifacts
uses: actions/download-artifact@v4
with:
path: coverage
pattern: coverage_*
merge-multiple: true
- name: Upload report to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: coverage
fail_ci_if_error: true
verbose: true