Skip to content

Resolves: MTV-5507 | Add post-migration setup phase display and VM access protection #5605

Resolves: MTV-5507 | Add post-migration setup phase display and VM access protection

Resolves: MTV-5507 | Add post-migration setup phase display and VM access protection #5605

name: Test
on:
pull_request:
env:
CONTAINER_CMD: docker
FORKLIFT_PLUGIN_IMAGE: localhost:5001/forklift-console-plugin:latest
OKD_CONSOLE_YAML: ./ci/yaml/okd-console.yaml
jobs:
linters:
name: Run linters
runs-on: ubuntu-latest
steps:
- name: Increase File Descriptors Limit
run: ulimit -n 4096
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Lint, eslint and stylelint
run: npm run lint
- name: Lint, test i18n files
run: npm run test:i18n
- name: Knip
run: npm run knip
build:
name: Build project
runs-on: ubuntu-latest
steps:
- name: Increase File Descriptors Limit
run: ulimit -n 4096
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Build project
run: npm run build
test:
name: Run tests and coverage
runs-on: ubuntu-latest
steps:
- name: Increase File Descriptors Limit
run: ulimit -n 4096
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Test
run: npm run test:coverage
- name: Test coverage
uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5.5.5
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
e2e:
name: Run e2e tests
runs-on: ubuntu-latest
env:
BASE_ADDRESS: http://localhost:30080
steps:
- name: Increase File Descriptors Limit
run: ulimit -n 4096
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Install testing dependencies
run: cd testing && npm ci
- name: Install Playwright browsers
run: cd testing && npx playwright install --with-deps chromium
- name: Check downstream version gating
run: cd testing && npm run check:version-gating
- name: Run pre e2e test tasks
run: npm run e2e:pre-test
- name: Wait for application
run: |
timeout 300 bash -c 'until curl -f http://localhost:30080; do sleep 5; done'
- name: Run Playwright tests (upstream only)
run: cd testing && npm run test:upstream
env:
BASE_ADDRESS: http://localhost:30080
- name: Upload Playwright test results
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
if: always()
with:
name: playwright-test-results
path: |
testing/test-results/
testing/playwright-report/