pontoon/.github/workflows/frontend.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

71 строка
1.9 KiB
YAML
Исходник Обычный вид История

name: Frontend
on:
push:
branches:
- main
paths:
Refactor the frontend build (#2437) * feat!(frontend): Drop react-scripts * chore(frontend): Add missing dependency on escape-html * refactor(frontend): Use ~ to prefix paths from src/ root * chore(frontend): Add & configure jest & ts-jest * chore(frontend): Fix bugs & tests revealed by updated jest, skipping EntityDetails * chore(frontend): Add ESLint as explicit dev dependency; satisfy linter * chore(frontend): Clean up dependencies, using caret ^ range for all * chore(frontend): Switch from yarn to npm & configure as a workspace Prettier & ESLint dependencies are now defined in the root package.json Changing package management means that many path & minor updates are simultaneously applied via the caret ^ ranges. The local/pontoon-frontend Docker image now uses node:16 as a base and /app/frontend rather than /frontend for its contents & workdir, in order to accommodate the changed topography. * chore: Collect devDependencies in root package.json * chore(tag-admin): Move Babel config to repo root * feat(frontend): Adjust public/ for being served as Django static files * chore(frontend): Add build with Rollup * feat(pontoon): Drop frontend proxy, server static files normally, add pipeline for frontend * chore(server): Add dependencies via pontoon/package.json; clean up Dockerfile * chore: Add build:prod targets for frontend & tag-admin frontend image droapped from Dockerfile as unused styled-components updated to v5 to avoid a broken import in v4. * chore: Add watch targets for workspaces & root, using concurrently * chore: Code review & CI-identified fixes * chore: Refresh lockfiles, dropping frontend/yaml.lock * chore: Add /bin/watch.sh to watch all builds; refactor `make run` * ci: Fix frontend TS test CLI args due to yarn -> npm change * chore: Use `npm start` rather than `npm run watch` * chore(pontoon): Mark django-pipeline JS dependencies as devDependencies * refactor: Rename frontend/ as translate/
2022-03-02 18:10:42 +03:00
- translate/**
- .github/workflows/frontend.yml
pull_request:
branches:
- main
paths:
Refactor the frontend build (#2437) * feat!(frontend): Drop react-scripts * chore(frontend): Add missing dependency on escape-html * refactor(frontend): Use ~ to prefix paths from src/ root * chore(frontend): Add & configure jest & ts-jest * chore(frontend): Fix bugs & tests revealed by updated jest, skipping EntityDetails * chore(frontend): Add ESLint as explicit dev dependency; satisfy linter * chore(frontend): Clean up dependencies, using caret ^ range for all * chore(frontend): Switch from yarn to npm & configure as a workspace Prettier & ESLint dependencies are now defined in the root package.json Changing package management means that many path & minor updates are simultaneously applied via the caret ^ ranges. The local/pontoon-frontend Docker image now uses node:16 as a base and /app/frontend rather than /frontend for its contents & workdir, in order to accommodate the changed topography. * chore: Collect devDependencies in root package.json * chore(tag-admin): Move Babel config to repo root * feat(frontend): Adjust public/ for being served as Django static files * chore(frontend): Add build with Rollup * feat(pontoon): Drop frontend proxy, server static files normally, add pipeline for frontend * chore(server): Add dependencies via pontoon/package.json; clean up Dockerfile * chore: Add build:prod targets for frontend & tag-admin frontend image droapped from Dockerfile as unused styled-components updated to v5 to avoid a broken import in v4. * chore: Add watch targets for workspaces & root, using concurrently * chore: Code review & CI-identified fixes * chore: Refresh lockfiles, dropping frontend/yaml.lock * chore: Add /bin/watch.sh to watch all builds; refactor `make run` * ci: Fix frontend TS test CLI args due to yarn -> npm change * chore: Use `npm start` rather than `npm run watch` * chore(pontoon): Mark django-pipeline JS dependencies as devDependencies * refactor: Rename frontend/ as translate/
2022-03-02 18:10:42 +03:00
- translate/**
- .github/workflows/frontend.yml
workflow_dispatch:
jobs:
typescript:
name: TypeScript
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '18' }
- name: Install dependencies
Refactor the frontend build (#2437) * feat!(frontend): Drop react-scripts * chore(frontend): Add missing dependency on escape-html * refactor(frontend): Use ~ to prefix paths from src/ root * chore(frontend): Add & configure jest & ts-jest * chore(frontend): Fix bugs & tests revealed by updated jest, skipping EntityDetails * chore(frontend): Add ESLint as explicit dev dependency; satisfy linter * chore(frontend): Clean up dependencies, using caret ^ range for all * chore(frontend): Switch from yarn to npm & configure as a workspace Prettier & ESLint dependencies are now defined in the root package.json Changing package management means that many path & minor updates are simultaneously applied via the caret ^ ranges. The local/pontoon-frontend Docker image now uses node:16 as a base and /app/frontend rather than /frontend for its contents & workdir, in order to accommodate the changed topography. * chore: Collect devDependencies in root package.json * chore(tag-admin): Move Babel config to repo root * feat(frontend): Adjust public/ for being served as Django static files * chore(frontend): Add build with Rollup * feat(pontoon): Drop frontend proxy, server static files normally, add pipeline for frontend * chore(server): Add dependencies via pontoon/package.json; clean up Dockerfile * chore: Add build:prod targets for frontend & tag-admin frontend image droapped from Dockerfile as unused styled-components updated to v5 to avoid a broken import in v4. * chore: Add watch targets for workspaces & root, using concurrently * chore: Code review & CI-identified fixes * chore: Refresh lockfiles, dropping frontend/yaml.lock * chore: Add /bin/watch.sh to watch all builds; refactor `make run` * ci: Fix frontend TS test CLI args due to yarn -> npm change * chore: Use `npm start` rather than `npm run watch` * chore(pontoon): Mark django-pipeline JS dependencies as devDependencies * refactor: Rename frontend/ as translate/
2022-03-02 18:10:42 +03:00
run: npm ci
- name: Check TypeScript
Refactor the frontend build (#2437) * feat!(frontend): Drop react-scripts * chore(frontend): Add missing dependency on escape-html * refactor(frontend): Use ~ to prefix paths from src/ root * chore(frontend): Add & configure jest & ts-jest * chore(frontend): Fix bugs & tests revealed by updated jest, skipping EntityDetails * chore(frontend): Add ESLint as explicit dev dependency; satisfy linter * chore(frontend): Clean up dependencies, using caret ^ range for all * chore(frontend): Switch from yarn to npm & configure as a workspace Prettier & ESLint dependencies are now defined in the root package.json Changing package management means that many path & minor updates are simultaneously applied via the caret ^ ranges. The local/pontoon-frontend Docker image now uses node:16 as a base and /app/frontend rather than /frontend for its contents & workdir, in order to accommodate the changed topography. * chore: Collect devDependencies in root package.json * chore(tag-admin): Move Babel config to repo root * feat(frontend): Adjust public/ for being served as Django static files * chore(frontend): Add build with Rollup * feat(pontoon): Drop frontend proxy, server static files normally, add pipeline for frontend * chore(server): Add dependencies via pontoon/package.json; clean up Dockerfile * chore: Add build:prod targets for frontend & tag-admin frontend image droapped from Dockerfile as unused styled-components updated to v5 to avoid a broken import in v4. * chore: Add watch targets for workspaces & root, using concurrently * chore: Code review & CI-identified fixes * chore: Refresh lockfiles, dropping frontend/yaml.lock * chore: Add /bin/watch.sh to watch all builds; refactor `make run` * ci: Fix frontend TS test CLI args due to yarn -> npm change * chore: Use `npm start` rather than `npm run watch` * chore(pontoon): Mark django-pipeline JS dependencies as devDependencies * refactor: Rename frontend/ as translate/
2022-03-02 18:10:42 +03:00
run: npm run types -- --pretty
working-directory: translate
- name: build
Refactor the frontend build (#2437) * feat!(frontend): Drop react-scripts * chore(frontend): Add missing dependency on escape-html * refactor(frontend): Use ~ to prefix paths from src/ root * chore(frontend): Add & configure jest & ts-jest * chore(frontend): Fix bugs & tests revealed by updated jest, skipping EntityDetails * chore(frontend): Add ESLint as explicit dev dependency; satisfy linter * chore(frontend): Clean up dependencies, using caret ^ range for all * chore(frontend): Switch from yarn to npm & configure as a workspace Prettier & ESLint dependencies are now defined in the root package.json Changing package management means that many path & minor updates are simultaneously applied via the caret ^ ranges. The local/pontoon-frontend Docker image now uses node:16 as a base and /app/frontend rather than /frontend for its contents & workdir, in order to accommodate the changed topography. * chore: Collect devDependencies in root package.json * chore(tag-admin): Move Babel config to repo root * feat(frontend): Adjust public/ for being served as Django static files * chore(frontend): Add build with Rollup * feat(pontoon): Drop frontend proxy, server static files normally, add pipeline for frontend * chore(server): Add dependencies via pontoon/package.json; clean up Dockerfile * chore: Add build:prod targets for frontend & tag-admin frontend image droapped from Dockerfile as unused styled-components updated to v5 to avoid a broken import in v4. * chore: Add watch targets for workspaces & root, using concurrently * chore: Code review & CI-identified fixes * chore: Refresh lockfiles, dropping frontend/yaml.lock * chore: Add /bin/watch.sh to watch all builds; refactor `make run` * ci: Fix frontend TS test CLI args due to yarn -> npm change * chore: Use `npm start` rather than `npm run watch` * chore(pontoon): Mark django-pipeline JS dependencies as devDependencies * refactor: Rename frontend/ as translate/
2022-03-02 18:10:42 +03:00
run: npm run build
working-directory: translate
licenses:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '18' }
- name: Install globals
run: npm install --global license-checker-rseidelsohn@4.4.2
- name: Install dependencies
run: npm ci
- name: Check licenses
run: |
# --failOn doesn't print the licenses on failure.
# Use jq to print only minimal info, then print a summary when
# checking for GPL packages.
license-checker-rseidelsohn --json | jq -r 'to_entries[] | "\(.key): \(.value.licenses)"'
license-checker-rseidelsohn --summary --failOn 'GPL'
jest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '18' }
- name: Install globals
run: npm install --global npm@8
- name: Install dependencies
Refactor the frontend build (#2437) * feat!(frontend): Drop react-scripts * chore(frontend): Add missing dependency on escape-html * refactor(frontend): Use ~ to prefix paths from src/ root * chore(frontend): Add & configure jest & ts-jest * chore(frontend): Fix bugs & tests revealed by updated jest, skipping EntityDetails * chore(frontend): Add ESLint as explicit dev dependency; satisfy linter * chore(frontend): Clean up dependencies, using caret ^ range for all * chore(frontend): Switch from yarn to npm & configure as a workspace Prettier & ESLint dependencies are now defined in the root package.json Changing package management means that many path & minor updates are simultaneously applied via the caret ^ ranges. The local/pontoon-frontend Docker image now uses node:16 as a base and /app/frontend rather than /frontend for its contents & workdir, in order to accommodate the changed topography. * chore: Collect devDependencies in root package.json * chore(tag-admin): Move Babel config to repo root * feat(frontend): Adjust public/ for being served as Django static files * chore(frontend): Add build with Rollup * feat(pontoon): Drop frontend proxy, server static files normally, add pipeline for frontend * chore(server): Add dependencies via pontoon/package.json; clean up Dockerfile * chore: Add build:prod targets for frontend & tag-admin frontend image droapped from Dockerfile as unused styled-components updated to v5 to avoid a broken import in v4. * chore: Add watch targets for workspaces & root, using concurrently * chore: Code review & CI-identified fixes * chore: Refresh lockfiles, dropping frontend/yaml.lock * chore: Add /bin/watch.sh to watch all builds; refactor `make run` * ci: Fix frontend TS test CLI args due to yarn -> npm change * chore: Use `npm start` rather than `npm run watch` * chore(pontoon): Mark django-pipeline JS dependencies as devDependencies * refactor: Rename frontend/ as translate/
2022-03-02 18:10:42 +03:00
run: npm ci
- name: Test
Refactor the frontend build (#2437) * feat!(frontend): Drop react-scripts * chore(frontend): Add missing dependency on escape-html * refactor(frontend): Use ~ to prefix paths from src/ root * chore(frontend): Add & configure jest & ts-jest * chore(frontend): Fix bugs & tests revealed by updated jest, skipping EntityDetails * chore(frontend): Add ESLint as explicit dev dependency; satisfy linter * chore(frontend): Clean up dependencies, using caret ^ range for all * chore(frontend): Switch from yarn to npm & configure as a workspace Prettier & ESLint dependencies are now defined in the root package.json Changing package management means that many path & minor updates are simultaneously applied via the caret ^ ranges. The local/pontoon-frontend Docker image now uses node:16 as a base and /app/frontend rather than /frontend for its contents & workdir, in order to accommodate the changed topography. * chore: Collect devDependencies in root package.json * chore(tag-admin): Move Babel config to repo root * feat(frontend): Adjust public/ for being served as Django static files * chore(frontend): Add build with Rollup * feat(pontoon): Drop frontend proxy, server static files normally, add pipeline for frontend * chore(server): Add dependencies via pontoon/package.json; clean up Dockerfile * chore: Add build:prod targets for frontend & tag-admin frontend image droapped from Dockerfile as unused styled-components updated to v5 to avoid a broken import in v4. * chore: Add watch targets for workspaces & root, using concurrently * chore: Code review & CI-identified fixes * chore: Refresh lockfiles, dropping frontend/yaml.lock * chore: Add /bin/watch.sh to watch all builds; refactor `make run` * ci: Fix frontend TS test CLI args due to yarn -> npm change * chore: Use `npm start` rather than `npm run watch` * chore(pontoon): Mark django-pipeline JS dependencies as devDependencies * refactor: Rename frontend/ as translate/
2022-03-02 18:10:42 +03:00
run: npm test --coverage
working-directory: translate
- uses: codecov/codecov-action@v4
with:
flags: frontend
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}