Skip to content

chore: ui support github actions #4

chore: ui support github actions

chore: ui support github actions #4

name: Pandaria Tests
on:
push:
branches:
- 'release-*-cn*'
pull_request:
branches:
- 'release-*-cn*'
workflow_dispatch:
inputs:
environment:
description: 'Environment to run tests against'
type: environment
required: true
env:
# Build the dashboard to use in tests. When set to false it will grab `latest` from CDN (useful for running e2e tests quickly)
BUILD_DASHBOARD: true
jobs:
unit-test:
runs-on: org-cnrancher-runner-k8s
container: ubuntu:24.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Run tests
uses: ./.github/actions/unit-tests
- name: Collect Coverage
run: |
mkdir -p coverage-artifacts/coverage
cp coverage/unit/coverage-final.json coverage-artifacts/coverage/coverage-unit.json
cp -r coverage/unit/ coverage-artifacts/coverage/unit/
- name: Upload coverage
uses: actions/upload-artifact@v3
with:
name: ${{github.run_number}}-${{github.run_attempt}}-coverage
path: coverage-artifacts/**/*
i18n:
runs-on: org-cnrancher-runner-k8s
container: ubuntu:24.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Run i18n lint
uses: ./.github/actions/i18n-lint
check-i18n:
runs-on: org-cnrancher-runner-k8s
container: ubuntu:24.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Install packages
run: yarn install:ci
- name: Run i18n string check
run: |
# Falure won't fail the job (remove -x when all current issues are fixed)
./scripts/check-i18n -s -x
lint:
runs-on: org-cnrancher-runner-k8s
container: ubuntu:24.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Run tests
uses: ./.github/actions/lint