Files
FreshRSS/.github/workflows/tests.yml
T
dependabot[bot]andAlexandre Alapetite 743e0422b8 chore(deps): bump the github-actions group with 3 updates (#9501)
Bumps the github-actions group with 3 updates: [ruby/setup-ruby](https://github.com/ruby/setup-ruby), [actions/setup-node](https://github.com/actions/setup-node) and [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action).


Updates `ruby/setup-ruby` from 1.327.0 to 1.329.0
- [Release notes](https://github.com/ruby/setup-ruby/releases)
- [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb)
- [Commits](https://github.com/ruby/setup-ruby/compare/14594264cd68ce8a2345dd349bc3d138a4ef85c8...651ff0d62c5c79bed6d53ec518387aae20e72c1a)

Updates `actions/setup-node` from 7.0.0 to 7.1.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/820762786026740c76f36085b0efc47a31fe5020...949feb2413d6458794dcd2491c4babbbce0c15c1)

Updates `zizmorcore/zizmor-action` from 0.6.4 to 0.7.1
- [Release notes](https://github.com/zizmorcore/zizmor-action/releases)
- [Commits](https://github.com/zizmorcore/zizmor-action/compare/cc914d7f3750a2d13d75c7f184a1060aa0e9d482...85b2b9fb8e3325e7a23d7d0a9d7ba5ae0f999e3e)

---
updated-dependencies:
- dependency-name: ruby/setup-ruby
  dependency-version: 1.329.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: actions/setup-node
  dependency-version: 7.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: zizmorcore/zizmor-action
  dependency-version: 0.7.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2026-10-24 23:04:43 +02:00

133 lines
3.7 KiB
YAML

name: Automated tests
on:
push:
branches: [ edge ]
pull_request:
branches: [ edge ]
permissions:
contents: read
concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
name: tests
# https://github.com/actions/runner-images
runs-on: ubuntu-26.04
steps:
- name: Git checkout source code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# Composer tests
- name: Check PHP syntax
run: composer run-script php-lint
- name: Check PHTML syntax
run: composer run-script phtml-lint
- name: Check translations syntax
run: composer run-script translations && git diff --exit-code
- name: Use Composer cache
id: composer-cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Run Composer install
run: composer install --prefer-dist --no-progress
if: steps.composer-cache.outputs.cache-hit != 'true'
- name: Run PHP unit tests
run: composer run-script phpunit -- --no-progress
- name: PHP_CodeSniffer
run: composer run-script phpcs
- name: PHPStan
run: composer run-script phpstan -- --no-progress
# - name: PHPStan Next
# run: composer run-script phpstan-next -- --no-progress
# NPM tests
- name: Uses Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
# https://nodejs.org/en/about/previous-releases
node-version: lts/*
cache: npm
- run: npm ci
- name: Check JavaScript syntax
run: npm run --silent eslint
- name: Check Markdown syntax
run: npm run --silent markdownlint
- name: Check CSS syntax
run: npm run --silent stylelint
- name: Check Right-to-left CSS
run: npm run --silent rtlcss && git diff --exit-code
- name: Optimize SVG image files
run: npm run --silent svgo && git diff --exit-code
# Shell tests
- name: Use shell cache
id: shell-cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: bin
key: ${{ runner.os }}-bin-shfmt@v3.8.0-hadolint@v2.15.1-typos@v1.49.0
- name: Add ./bin/ to $PATH
run: mkdir -p bin/ && echo "${PWD}/bin" >> $GITHUB_PATH
- name: Install shfmt
if: steps.shell-cache.outputs.cache-hit != 'true'
run: GOBIN=${PWD}/bin/ go install mvdan.cc/sh/v3/cmd/shfmt@v3.8.0
- name: Check shell script syntax
run: ./tests/shellchecks.sh
- name: Install hadolint
if: steps.shell-cache.outputs.cache-hit != 'true'
run: |
curl -sL -o ./bin/hadolint "https://github.com/hadolint/hadolint/releases/download/v2.15.1/hadolint-linux-x86_64" &&
echo 'c7187db94eeeeca956519a6af171adc31453941a1e777961f6e680f697c8c507 ./bin/hadolint' | sha256sum -c - &&
chmod 700 ./bin/hadolint
- name: Check Dockerfile syntax
run: find . -name 'Dockerfile*' -print0 | xargs -0 -n1 ./bin/hadolint --failure-threshold warning
- name: Install typos
if: steps.shell-cache.outputs.cache-hit != 'true'
run: |
cd bin ;
wget -q 'https://github.com/crate-ci/typos/releases/download/v1.49.0/typos-v1.49.0-x86_64-unknown-linux-musl.tar.gz' &&
echo '48bd2d58e02ce713b8c0f1aa239e68ee4f7d8c551013135806e6aed3938d9e10 typos-v1.49.0-x86_64-unknown-linux-musl.tar.gz' | sha256sum -c - &&
tar -xvf *.tar.gz './typos' &&
chmod +x typos &&
rm *.tar.gz ;
cd ..
- name: Check spelling
run: bin/typos