Skip to content

(chore): Bump eslint-plugin-formatjs from 6.4.5 to 6.4.6 in the lint-dependencies group across 1 directory #2775

(chore): Bump eslint-plugin-formatjs from 6.4.5 to 6.4.6 in the lint-dependencies group across 1 directory

(chore): Bump eslint-plugin-formatjs from 6.4.5 to 6.4.6 in the lint-dependencies group across 1 directory #2775

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
- stage-onprem
push:
branches:
- main
env:
BRANCH: ${{ github.base_ref }}
NODEJS_VERSION: '22'
jobs:
build:
# This job is run for PRs only, as a sanity check, to confirm ci.ext.devshift.net is working properly
if: ${{ github.event_name == 'pull_request' }}
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODEJS_VERSION }}
- name: Cache node modules
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Lint
run: npm run lint
- name: Build OnPrem
id: build-onprem
uses: redhat-actions/buildah-build@v2
with:
image: localhost/koku-ui-onprem
tags: latest
extra-args: |
--ulimit nofile=10000:10000
containerfiles: apps/koku-ui-onprem/Containerfile
context: .
units:
name: Units
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODEJS_VERSION }}
- name: Cache node modules
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: npm ci
- name: Test
id: test_run
run: npm test -- --collect-coverage --max-workers=4
- uses: actions/upload-artifact@v5
if: ${{ steps.test_run.outcome == 'success' }}
name: Save coverage report
with:
name: coverage_report
path: apps/*/coverage/
retention-days: 10
coverage:
name: Coverage
needs: [units]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Download coverage report
uses: actions/download-artifact@v6
with:
name: coverage_report
path: coverage
- name: Upload coverage report
if: ${{ success() }}
uses: codecov/codecov-action@v5.5.1
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
directory: coverage
plugin: pycoverage # Only run one plugin so that all do not run. There is no way to disable plugins entirely.
cypress:
name: Cypress E2E Tests
needs: [build, units]
if: always()
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODEJS_VERSION }}
- name: Cache node modules
id: cache-npm
uses: actions/cache@v4
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: npm ci
- name: Cypress run
id: cypress_run
uses: cypress-io/github-action@v6
with:
install-command: npm ci
build: npm run build:onprem
start: npm run -w @koku-ui/koku-ui-onprem start:prod
wait-on: http://localhost:9001
wait-on-timeout: 120
project: apps/koku-ui-onprem
config-file: cypress/cypress.config.ts
- name: Upload Cypress videos
if: failure() && steps.cypress_run.outcome == 'failure'
uses: actions/upload-artifact@v5
with:
name: cypress-videos
path: apps/koku-ui-onprem/cypress/videos
retention-days: 14
if-no-files-found: ignore