agama/.github/workflows/ci-web.yml
Ladislav Slezák b8709ebc68
Update GitHub Actions to the latest versions
Many Actions complain that an old Node20 code is used.
Update the actions to use newer versions.

https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
2026-03-27 17:07:29 +01:00

96 lines
2.5 KiB
YAML

name: CI - Web
permissions:
contents: read
on:
push:
paths:
# NOTE: GitHub Actions do not allow using YAML references, the same path
# list is used below for the pull request event. Keep both lists in sync!!
# this file as well
- .github/workflows/ci-web.yml
# any change in the web subfolder
- web/**
# except Markdown documentation
- "!web/**.md"
# except the packaging
- "!web/package/**"
pull_request:
paths:
# NOTE: GitHub Actions do not allow using YAML references, the same path
# list is used above for the push event. Keep both lists in sync!!
# this file as well
- .github/workflows/ci-web.yml
# any change in the web subfolder
- web/**
# except Markdown documentation
- "!web/**.md"
# except the packaging
- "!web/package/**"
# allow running manually
workflow_dispatch:
jobs:
frontend_build:
# the default timeout is 6 hours, that's too much if the job gets stuck
timeout-minutes: 60
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web
strategy:
matrix:
node-version: ["22.x"]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v6
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: 'web/package-lock.json'
- name: Install dependencies
run: npm ci
- name: Check types
run: npm run check-types
- name: Build the application
run: npm run build
- name: Run ESLint
run: npm run eslint
- name: Run Stylelint
run: npm run stylelint
- name: Run the tests and generate coverage report
run: npm test -- --coverage --silent
# send the code coverage for the web part to the coveralls.io
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2
with:
base-path: ./web
flag-name: web
parallel: true
# close the code coverage and inherit the previous coverage for the Ruby and
# Rust parts (it needs a separate step, the "carryforward" flag can be used
# only with the "parallel-finished: true" option)
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
carryforward: "rust,service,web"