Skip to content

build(deps): Bump the github-actions group across 1 directory with 7 updates #11679

build(deps): Bump the github-actions group across 1 directory with 7 updates

build(deps): Bump the github-actions group across 1 directory with 7 updates #11679

# SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
name: Analysis & Coverage
on:
pull_request:
push:
branches:
- master
jobs:
test:
permissions:
contents: read
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
db-type: [postgres, 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:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
path: ${{ env.APP_NAME }}
submodules: true
- name: Install dependencies
run: sudo apt install gettext netcat-openbsd xvfb redis-server
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.12'
- name: Install poetry
run: pip install poetry==1.8.2
- uses: browser-actions/setup-firefox@fcf821c621167805dd63a29662bd7cb5676c81a8 # v1.7.1
with:
firefox-version: latest
- name: Set up Geckodriver
uses: browser-actions/setup-geckodriver@5ef1526ed36211ab6cb531ec1cfb11f924ca2dee # latest
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
# Skip if no package.json
if: ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
- 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@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: coverage_${{ matrix.db-type }}.xml
path: coverage.xml
if-no-files-found: error
upload-codecov:
needs: [ test ]
permissions:
contents: none
runs-on: ubuntu-24.04
name: Upload Coverage
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
path: ${{ env.APP_NAME }}
- name: Download Coverage Artifacts
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
with:
path: coverage
pattern: coverage_*
merge-multiple: true
- name: Upload report to Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: coverage
fail_ci_if_error: true
verbose: true