Skip to content

NAS-128473 / 24.04.1 / Storage tab of dashboard on mobile fails to load #14985

NAS-128473 / 24.04.1 / Storage tab of dashboard on mobile fails to load

NAS-128473 / 24.04.1 / Storage tab of dashboard on mobile fails to load #14985

Workflow file for this run

name: WebUI
on:
push:
branches:
- master
paths-ignore:
- 'tests/**'
pull_request:
branches:
- '**'
paths-ignore:
- 'tests/**'
jobs:
install:
name: Checkout and Install
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install
uses: ./.github/actions/prepare
check-files:
name: Check if translations only were changed
runs-on: ubuntu-latest
outputs:
translations-only: ${{ steps.determine-changes.outputs.translations-only }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Determine if only translations were changed
id: determine-changes
run: |
CHANGED_FILES=$(git diff --name-only HEAD~1 ${{ github.sha }})
echo "Changed files:"
echo "$CHANGED_FILES"
TRANSLATIONS_ONLY="true"
for file in $CHANGED_FILES; do
if [[ "$file" != "src/assets/i18n/"* ]]; then
TRANSLATIONS_ONLY="false"
break
fi
done
echo "::set-output name=translations-only::$TRANSLATIONS_ONLY"
build:
name: Build
needs: [check-files, install]
runs-on: ubuntu-latest
if: ${{ needs.check-files.outputs.translations-only == 'false' }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install
uses: ./.github/actions/prepare
- name: Build
run: yarn build:prod:aot
lint:
name: Validate code style
needs: [check-files, install]
runs-on: ubuntu-latest
if: ${{ needs.check-files.outputs.translations-only == 'false' }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install
uses: ./.github/actions/prepare
- name: Generate default environment file
run: yarn run check-env
- name: Build
run: yarn lint
lint-translations:
name: Validate translation strings
needs: [check-files, install]
if: ${{ needs.check-files.outputs.translations-only == 'false' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install
uses: ./.github/actions/prepare
- name: Build
run: yarn run extract
test:
name: Run tests
needs: [check-files, install]
runs-on: ubuntu-latest
if: ${{ needs.check-files.outputs.translations-only == 'false' }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install
uses: ./.github/actions/prepare
- name: Run tests
run: yarn test:pr
- if: ${{ env.CODECOV_TOKEN }}
name: Upload coverage to codecov
uses: codecov/codecov-action@v3
with:
name: webui
token: ${{ env.CODECOV_TOKEN }}
fail_ci_if_error: true
resort-strings:
name: Resort Strings and Commit if only translations were added
needs: [check-files, install]
runs-on: ubuntu-latest
if: ${{ needs.check-files.outputs.translations-only == 'true' }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 1
- name: Install
uses: ./.github/actions/prepare
- name: Extract Messages
run: yarn run extract
- name: Validate Translations
run: yarn run validate-translations
- name: Commit and Push Changes
run: |
git config --global user.name 'BugClerk'
git config --global user.email 'bugclerk@ixsystems.com'
git pull origin ${{ github.head_ref }} --no-edit
git add src/assets/i18n
if ! git diff --quiet --cached; then
git commit -m "NAS-XXXXXX: Auto resort translation strings"
git push origin ${{ github.head_ref }}
else
echo "No changes to commit."
fi