Skip to content

Commit

Permalink
Merge pull request #1430 from IFRCGo/feature/translation-fixes
Browse files Browse the repository at this point in the history
Feature/translation fixes
  • Loading branch information
samshara authored Nov 19, 2024
2 parents 8f7a9bb + 18c6930 commit 99f0cc1
Show file tree
Hide file tree
Showing 322 changed files with 15,618 additions and 13,332 deletions.
42 changes: 27 additions & 15 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,25 @@ jobs:
working-directory: packages/ui
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
- name: Install dependencies on UI library
run: yarn install --frozen-lockfile
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Typecheck
run: yarn typecheck
run: pnpm typecheck
- name: Lint CSS
run: yarn lint:css
run: pnpm lint:css
- name: Lint JS
run: yarn lint:js
run: pnpm lint:js
- name: build UI library
run: yarn build
run: pnpm build
- uses: actions/upload-artifact@v4
with:
name: ui-build
Expand All @@ -48,16 +53,19 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- uses: actions/download-artifact@v4
with:
name: ui-build
path: packages/ui/dist
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run Chromatic
uses: chromaui/action@v1
with:
Expand All @@ -76,16 +84,20 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- uses: actions/download-artifact@v4
with:
name: ui-build
path: packages/ui/dist
- uses: bitovi/github-actions-storybook-to-github-pages@v1.0.3
with:
install_command: yarn install
build_command: yarn build-storybook
install_command: pnpm install
build_command: pnpm build-storybook
path: packages/go-ui-storybook/storybook-static
checkout: false
155 changes: 87 additions & 68 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,27 @@ jobs:
working-directory: packages/ui
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'

- name: Install dependencies on UI library
run: yarn install --frozen-lockfile
cache: 'pnpm'
- name: Install dependencies
run: pnpm install

- name: Typecheck
run: yarn typecheck
run: pnpm typecheck

- name: Lint CSS
run: yarn lint:css
run: pnpm lint:css

- name: Lint JS
run: yarn lint:js
run: pnpm lint:js

- name: build UI library
run: yarn build
- name: Build
run: pnpm build

- uses: actions/upload-artifact@v4
with:
Expand All @@ -60,163 +62,180 @@ jobs:
name: Run tests
environment: 'test'
runs-on: ubuntu-latest
defaults:
run:
working-directory: app
needs: [ui]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install

- uses: actions/download-artifact@v4
with:
name: ui-build
path: packages/ui/dist

- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: app

- name: Run test
run: yarn test
working-directory: app
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
- uses: actions/setup-node@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install

- uses: actions/download-artifact@v4
with:
name: ui-build
path: packages/ui/dist

- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: app

- name: Identify error with translation files
run: yarn lint:translation
working-directory: app
run: pnpm lint:translation

unimported:
name: Identify unused files
runs-on: ubuntu-latest
needs: [ui]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'

- uses: actions/download-artifact@v4
with:
name: ui-build
path: packages/ui/dist

cache: 'pnpm'
- name: Install dependencies
run: yarn install --frozen-lockfile
run: pnpm install

- name: Initialize types
run: pnpm initialize:type
working-directory: app

- name: Identify unused files
run: yarn lint:unused
working-directory: app
run: pnpm lint:unused

lint:
name: Lint JS
runs-on: ubuntu-latest
defaults:
run:
working-directory: app
needs: [ui]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install

- uses: actions/download-artifact@v4
with:
name: ui-build
path: packages/ui/dist

- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: app

- name: Lint JS
run: yarn lint:js
working-directory: app
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
- uses: actions/setup-node@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install

- uses: actions/download-artifact@v4
with:
name: ui-build
path: packages/ui/dist

- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: app

- name: Lint CSS
run: yarn lint:css
working-directory: app
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
# - uses: actions/setup-node@v4
# - name: Install pnpm
# uses: pnpm/action-setup@v4
# - name: Install Node.js
# uses: actions/setup-node@v4
# with:
# node-version: 20
# cache: 'yarn'

# cache: 'pnpm'
# - name: Install dependencies
# run: yarn install --frozen-lockfile

# run: pnpm install
#
# - name: Typecheck
# run: yarn typecheck
# run: pnpm typecheck
build:
name: Build GO Web App
environment: 'test'
needs: [lint, lint-css, test, ui]
runs-on: ubuntu-latest
defaults:
run:
working-directory: app
needs: [lint, lint-css, test, ui]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install

- uses: actions/download-artifact@v4
with:
name: ui-build
path: packages/ui/dist

- name: Install dependencies
run: yarn install --frozen-lockfile
working-directory: app

- name: Build
run: yarn build
working-directory: app
run: pnpm build

validate_helm:
name: Validate Helm
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
enable-pre-post-scripts=true
Loading

0 comments on commit 99f0cc1

Please sign in to comment.