Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
82 changes: 18 additions & 64 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -1,70 +1,24 @@
name: Code Quality

on:
push:
branches: [main, development, feature/**, bugfix/**, hotfix/**]
pull_request:
branches: [main, master, development]

concurrency:
group: quality-${{ github.head_ref || github.ref }}
cancel-in-progress: true
branches: [main, beta, development]
workflow_dispatch:

jobs:
php-checks:
name: ${{ matrix.check.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
check:
- { name: "PHP Lint", command: "composer lint" }
- { name: "PHPCS", command: "./vendor/bin/phpcs --standard=phpcs.xml" }
- { name: "PHPMD", command: "./vendor/bin/phpmd lib text phpmd.xml" }
- { name: "Psalm", command: "./vendor/bin/psalm --threads=1 --no-cache --output-format=github" }
- { name: "PHPStan", command: "./vendor/bin/phpstan analyse --memory-limit=1G" }
- { name: "PHPUnit", command: "./vendor/bin/phpunit --colors=always" }

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, xml, ctype, iconv, intl, dom, filter, gd, json, posix, zip, soap
tools: composer:v2

- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader

- name: ${{ matrix.check.name }}
run: ${{ matrix.check.command }}
frontend-quality:
name: Frontend Quality
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: ESLint
run: npm run lint

- name: Stylelint
run: npm run stylelint
quality:
uses: ConductionNL/.github/.github/workflows/quality.yml@main
with:
app-name: openconnector
php-version: "8.3"
nextcloud-test-refs: '["stable32"]'
enable-psalm: true
enable-phpstan: true
enable-phpmetrics: true
enable-frontend: true
enable-eslint: true
enable-phpunit: true
enable-sbom: true
additional-apps: '[{"repo":"ConductionNL/openregister","app":"openregister"}]'
50 changes: 5 additions & 45 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,12 @@ name: Documentation

on:
push:
branches:
- development
branches: [documentation]
pull_request:
branches:
- development
branches: [documentation]

jobs:
deploy:
name: Deploy Documentation
runs-on: ubuntu-latest
steps:
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v4
with:
fetch-depth: 0

# Verify directory structure
- name: List directory structure
run: |
ls -la
ls -la docusaurus/

# Generate SVG files using PlantUML
- name: plantuml
id: plantuml
uses: grassedge/generate-plantuml-action@v1.5
with:
message: "Render PlantUML files"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# https://github.com/marketplace/actions/docusaurus-builddeploy-action
- name: Deploy Docusaurus
id: deploy
uses: redkubes/docusaurus-deploy-action@v1.2
with:
source-folder: docusaurus
git-user: ${{ github.actor }}
git-password: ${{ secrets.GITHUB_TOKEN }}
deployment-branch: gh-pages

# https://github.com/marketplace/actions/create-an-issue
- name: Create issue on failure
if: failure()
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/DOCUMENTATION_ISSUE_TEMPLATE.md
uses: ConductionNL/.github/.github/workflows/documentation.yml@main
with:
cname: conductionnl.github.io
91 changes: 0 additions & 91 deletions .github/workflows/sbom.yml

This file was deleted.

124 changes: 0 additions & 124 deletions .github/workflows/tests.yml

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 11 additions & 2 deletions docusaurus/docusaurus.config.js → docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ const config = {
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
locales: ['en', 'nl'],
localeConfigs: {
en: { label: 'English' },
nl: { label: 'Nederlands' },
},
},

presets: [
Expand All @@ -31,8 +35,9 @@ const config = {
({
docs: {
path: '../docs',
exclude: ['**/node_modules/**'],
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/conductionnl/openconnector/tree/main/docusaurus/',
editUrl: 'https://github.com/conductionnl/openconnector/tree/main/docs/',
},
blog: false,
theme: {
Expand Down Expand Up @@ -63,6 +68,10 @@ const config = {
label: 'GitHub',
position: 'right',
},
{
type: 'localeDropdown',
position: 'right',
},
],
},
footer: {
Expand Down
Loading
Loading