2020-12-22 15:16:25 +03:00
|
|
|
name: Frontend
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2023-09-19 14:39:03 +03:00
|
|
|
- main
|
2020-12-22 15:16:25 +03:00
|
|
|
paths:
|
2022-03-02 18:10:42 +03:00
|
|
|
- translate/**
|
2020-12-22 15:16:25 +03:00
|
|
|
- .github/workflows/frontend.yml
|
|
|
|
pull_request:
|
|
|
|
branches:
|
2023-09-19 14:39:03 +03:00
|
|
|
- main
|
2020-12-22 15:16:25 +03:00
|
|
|
paths:
|
2022-03-02 18:10:42 +03:00
|
|
|
- translate/**
|
2020-12-22 15:16:25 +03:00
|
|
|
- .github/workflows/frontend.yml
|
2022-02-16 02:18:45 +03:00
|
|
|
workflow_dispatch:
|
2020-12-22 15:16:25 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
typescript:
|
|
|
|
name: TypeScript
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-02-22 12:46:36 +03:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
2023-10-12 17:57:16 +03:00
|
|
|
with: { node-version: '18' }
|
2021-03-17 20:18:09 +03:00
|
|
|
- name: Install dependencies
|
2022-03-02 18:10:42 +03:00
|
|
|
run: npm ci
|
2020-12-22 15:16:25 +03:00
|
|
|
- name: Check TypeScript
|
2022-03-02 18:10:42 +03:00
|
|
|
run: npm run types -- --pretty
|
|
|
|
working-directory: translate
|
2020-12-22 15:16:25 +03:00
|
|
|
- name: build
|
2022-03-02 18:10:42 +03:00
|
|
|
run: npm run build
|
|
|
|
working-directory: translate
|
2020-12-22 15:16:25 +03:00
|
|
|
|
2024-09-30 11:13:43 +03:00
|
|
|
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'
|
|
|
|
|
2020-12-22 15:16:25 +03:00
|
|
|
jest:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-02-22 12:46:36 +03:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
2023-10-12 17:57:16 +03:00
|
|
|
with: { node-version: '18' }
|
2020-12-22 15:16:25 +03:00
|
|
|
- name: Install globals
|
2023-04-18 07:42:52 +03:00
|
|
|
run: npm install --global npm@8
|
2020-12-22 15:16:25 +03:00
|
|
|
- name: Install dependencies
|
2022-03-02 18:10:42 +03:00
|
|
|
run: npm ci
|
2020-12-22 15:16:25 +03:00
|
|
|
- name: Test
|
2022-03-02 18:10:42 +03:00
|
|
|
run: npm test --coverage
|
|
|
|
working-directory: translate
|
2024-02-22 12:46:36 +03:00
|
|
|
- uses: codecov/codecov-action@v4
|
2024-05-10 11:31:28 +03:00
|
|
|
with:
|
|
|
|
flags: frontend
|
|
|
|
env:
|
|
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|