Merge pull request #2192 from nodiscc/doc-act #665
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Shaarli CI | |
| on: [push, pull_request] | |
| jobs: | |
| php: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # NOTE: When updating PHP versions, also update doc/md/Server-configuration.md | |
| php-versions: ['8.1', '8.2', '8.3', '8.4'] | |
| name: PHP ${{ matrix.php-versions }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Gettext | |
| run: | | |
| sudo apt-get update && \ | |
| sudo apt-get install -y gettext | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-versions }} | |
| extensions: gd, xml, curl, mbstring, intl, gettext, ldap | |
| tools: composer:v2 | |
| - name: Allow APT Release label changes # workaround for https://github.com/oerdnj/deb.sury.org/issues/2295 | |
| run: echo 'Acquire::AllowReleaseInfoChange::Label "true";' | sudo tee /etc/apt/apt.conf.d/label_change | |
| - name: Check PHP version | |
| run: php -v | |
| - name: Setup Composer platform config | |
| run: composer config --unset platform && composer config platform.php ${{ matrix.php-versions }} | |
| - name: Install Composer dependencies | |
| run: | | |
| composer install --no-interaction --prefer-dist | |
| - name: Install locales | |
| run: | | |
| sudo apt-get update && \ | |
| sudo apt-get install -y locales | |
| - name: Set locales | |
| run: | | |
| sudo locale-gen de_DE.utf8 && \ | |
| sudo locale-gen en_US.utf8 && \ | |
| sudo locale-gen fr_FR.utf8 | |
| - name: Check locales | |
| run: locale -a | |
| - name: Clean up | |
| run: make clean | |
| - name: Check permissions | |
| run: make check_permissions | |
| - name: Run PHPCS | |
| run: make code_sniffer | |
| - name: Run tests | |
| run: make all_tests | |
| node: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| - name: Yarn install | |
| run: yarnpkg install | |
| - name: Verify successful frontend builds | |
| run: yarnpkg run build | |
| - name: JS static analysis | |
| run: make eslint | |
| - name: Linter for SASS syntax | |
| run: make sasslint | |
| python: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Build documentation | |
| run: make htmldoc | |
| trivy-repo: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Run trivy scanner on repository (non-blocking) | |
| run: make test_trivy_repo TRIVY_EXIT_CODE=0 |