Skip to content

Feature/translation fixes #3920

Feature/translation fixes

Feature/translation fixes #3920

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- 'develop'
env:
APP_ADMIN_URL: ${{ vars.APP_ADMIN_URL }}
APP_API_ENDPOINT: ${{ vars.APP_API_ENDPOINT }}
APP_ENVIRONMENT: ${{ vars.APP_ENVIRONMENT }}
APP_MAPBOX_ACCESS_TOKEN: ${{ vars.APP_MAPBOX_ACCESS_TOKEN }}
APP_RISK_ADMIN_URL: ${{ vars.APP_RISK_ADMIN_URL }}
APP_RISK_API_ENDPOINT: ${{ vars.APP_RISK_API_ENDPOINT }}
APP_SENTRY_DSN: ${{ vars.APP_SENTRY_DSN }}
APP_SENTRY_NORMALIZE_DEPTH: ${{ vars.APP_SENTRY_NORMALIZE_DEPTH }}
APP_SENTRY_TRACES_SAMPLE_RATE: ${{ vars.APP_SENTRY_TRACES_SAMPLE_RATE }}
APP_SHOW_ENV_BANNER: ${{ vars.APP_SHOW_ENV_BANNER }}
APP_TINY_API_KEY: ${{ vars.APP_TINY_API_KEY }}
APP_TITLE: ${{ vars.APP_TITLE }}
GITHUB_WORKFLOW: true
jobs:
ui:
name: Build UI Library
environment: 'test'
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/ui
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Typecheck
run: pnpm typecheck
- name: Lint CSS
run: pnpm lint:css
- name: Lint JS
run: pnpm lint:js
- name: Build
run: pnpm build
- uses: actions/upload-artifact@v4
with:
name: ui-build
path: packages/ui/dist
test:
name: Run tests
environment: 'test'
runs-on: ubuntu-latest
defaults:
run:
working-directory: app
needs: [ui]
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- uses: actions/download-artifact@v4
with:
name: ui-build
path: packages/ui/dist
- name: Run test
run: pnpm test
translation:
continue-on-error: true
name: Identify error with translation files
runs-on: ubuntu-latest
defaults:
run:
working-directory: app
needs: [ui]
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- uses: actions/download-artifact@v4
with:
name: ui-build
path: packages/ui/dist
- name: Identify error with translation files
run: pnpm lint:translation
unimported:
name: Identify unused files
runs-on: ubuntu-latest
needs: [ui]
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Initialize types
run: pnpm initialize:type
working-directory: app
- name: Identify unused files
run: pnpm lint:unused
lint:
name: Lint JS
runs-on: ubuntu-latest
defaults:
run:
working-directory: app
needs: [ui]
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- uses: actions/download-artifact@v4
with:
name: ui-build
path: packages/ui/dist
- name: Lint JS
run: pnpm lint:js
lint-css:
name: Lint CSS
runs-on: ubuntu-latest
defaults:
run:
working-directory: app
needs: [ui]
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- uses: actions/download-artifact@v4
with:
name: ui-build
path: packages/ui/dist
- name: Lint CSS
run: pnpm lint:css
# FIXME: Identify a way to generate schema before we run typecheck
# typecheck:
# name: Typecheck
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Install pnpm
# uses: pnpm/action-setup@v4
# - name: Install Node.js
# uses: actions/setup-node@v4
# with:
# node-version: 20
# cache: 'pnpm'
# - name: Install dependencies
# run: pnpm install
#
# - name: Typecheck
# run: pnpm typecheck
build:
name: Build GO Web App
environment: 'test'
runs-on: ubuntu-latest
defaults:
run:
working-directory: app
needs: [lint, lint-css, test, ui]
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- uses: actions/download-artifact@v4
with:
name: ui-build
path: packages/ui/dist
- name: Build
run: pnpm build
validate_helm:
name: Validate Helm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Install Helm
uses: azure/setup-helm@v4
- name: 🐳 Helm lint
run: helm lint ./nginx-serve/helm --values ./nginx-serve/helm/values-test.yaml
- name: 🐳 Helm template
run: helm template ./nginx-serve/helm --values ./nginx-serve/helm/values-test.yaml