Skip to content

Commit

Permalink
Merge branch 'release-candidate' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonLantukh committed Apr 5, 2024
2 parents 40cdc68 + b80ab06 commit a1b0c58
Show file tree
Hide file tree
Showing 1,233 changed files with 37,928 additions and 33,398 deletions.
2 changes: 2 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module.exports = {
'user',
'watchhistory',
'favorites',
'profiles',
'analytics',
'pwa',
'seo',
Expand All @@ -29,6 +30,7 @@ module.exports = {
'epg',
'tests',
'i18n',
'a11y',
],
],
},
Expand Down
30 changes: 0 additions & 30 deletions .depcheckrc.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions .env

This file was deleted.

6 changes: 2 additions & 4 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Modules
node_modules/

# Test
coverage/

# Build output
build/

coverage/
128 changes: 1 addition & 127 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,129 +1,3 @@
const restrictedGlobals = require('confusing-browser-globals');

module.exports = {
parser: '@typescript-eslint/parser',

plugins: [
// Enable Typescript linting
'@typescript-eslint',

// Enable linting imports
'import',
],

extends: [
// Use default ESLint rules
'eslint:recommended',

// Use recommended TS rules
'plugin:@typescript-eslint/recommended',

// Use recommended React rules
'plugin:react/recommended',

'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
],

env: {
// Browser conf
browser: true,
es6: true,
},

rules: {
// Prevent development/debugging statements
'no-console': ['error', { allow: ['warn', 'error', 'info', 'debug'] }],
'no-alert': 'error',
'no-debugger': 'error',

// Prevent usage of confusing globals
'no-restricted-globals': ['error'].concat(restrictedGlobals),

// Assignments in function returns is confusing and could lead to unwanted side-effects
'no-return-assign': ['error', 'always'],

curly: ['error', 'multi-line'],

// Strict import ordering
'import/order': [
'warn',
{
groups: ['builtin', 'external', 'parent', 'sibling', 'index'],
pathGroups: [
// Sort absolute root imports before parent imports
{
pattern: '/**',
group: 'parent',
position: 'before',
},
],
'newlines-between': 'always',
},
],
// Not needed in React 17
'react/react-in-jsx-scope': 'off',
'import/no-named-as-default-member': 'off',
},
overrides: [
{
files: ['*.js'],
env: {
// We may still use CJS in .js files (eg. local scripts)
commonjs: true,
},
rules: {
// `require` is still allowed/recommended in JS
'@typescript-eslint/no-var-requires': 'off',
},
},
{
files: ['*.ts', '*.tsx'],
rules: {
// TypeScript 4.0 adds 'any' or 'unknown' type annotation on catch clause variables.
// We need to make sure error is of the type we are expecting
'@typescript-eslint/no-implicit-any-catch': 'error',

// These are handled by TS
'@typescript-eslint/no-explicit-any': ['warn', { ignoreRestArgs: true }],
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'import/no-unresolved': 'off',
},
},
{
files: ['*.jsx', '*.tsx', 'src/hooks/*.ts'],
plugins: [
// Enable linting React code
'react',
'react-hooks',
],
rules: {
// Help with Hooks syntax
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',

// Handled by Typescript
'react/prop-types': 'off',

// This rule causes too many false positives, eg. with default exports or child render function
'react/display-name': 'off',
},
},
],

settings: {
react: {
pragma: 'React',
version: '17',
},
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
extends: ['jwp/typescript'],
};
3 changes: 2 additions & 1 deletion .github/workflows/release-build-tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
echo "current-version=${version}" >> "$GITHUB_OUTPUT"
- name: Build App
working-directory: ./platforms/web
run: |
yarn build
cd build
Expand Down Expand Up @@ -51,7 +52,7 @@ jobs:
if: ${{ steps.package-version.outputs.current-version }}
with:
commit: 'release'
artifacts: 'build/ott-web-app-build-*.tar.gz, build/ott-web-app-build-*.zip'
artifacts: 'web/build/ott-web-app-build-*.tar.gz, web/build/ott-web-app-build-*.zip'
tag: v${{ steps.package-version.outputs.current-version }}
bodyFile: '.github/RELEASE_BODY_TEMPLATE.md'
token: ${{ secrets.github_token }}
22 changes: 0 additions & 22 deletions .github/workflows/release-deploy-prod-demo.yml

This file was deleted.

44 changes: 0 additions & 44 deletions .github/workflows/test-e2e.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/test-preview-and-lighthouse.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/test-unit-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: yarn install, build, and test
- name: yarn install and test
run: |
yarn
yarn test
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/web-release-deploy-prod-demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Web - Release - Deploy Prod Demo Site

on:
push:
branches: ['release']
workflow_dispatch:

defaults:
run:
working-directory: ./platforms/web

jobs:
deploy_live_website:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
env:
APP_PLAYER_LICENSE_KEY: ${{ secrets.PLAYER_LICENSE_KEY }}
APP_GOOGLE_SITE_VERIFICATION_ID: ${{ vars.GOOGLE_SITE_VERIFICATION_ID }}
run: yarn && MODE=demo yarn build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}'
channelId: live
entryPoint: './platforms/web'
39 changes: 39 additions & 0 deletions .github/workflows/web-test-deploy-preview-and-lighthouse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Web - Test - PR Deploy Preview and Lighthouse Test

on:
pull_request:

defaults:
run:
working-directory: ./platforms/web

jobs:
build_and_preview:
name: Build and preview
runs-on: ubuntu-latest
outputs:
output1: ${{ steps.firebase_hosting_preview.outputs.details_url }}
steps:
- uses: actions/checkout@v3
- name: Build Preview Link
env:
APP_PLAYER_LICENSE_KEY: ${{ secrets.PLAYER_LICENSE_KEY }}
run: yarn && MODE=preview yarn build
- uses: FirebaseExtended/action-hosting-deploy@v0
id: firebase_hosting_preview
with:
entryPoint: './platforms/web'
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}'
expires: 30d

lhci:
name: Lighthouse
runs-on: ubuntu-latest
needs: build_and_preview
steps:
- uses: actions/checkout@v3
- name: Install Lighthouse CI
run: sudo yarn global add @lhci/[email protected]
- name: Run Lighthouse CI
run: lhci autorun --collect.url=${{ needs.build_and_preview.outputs.output1 }}?app-config=gnnuzabk --config=./lighthouserc.cjs
Loading

0 comments on commit a1b0c58

Please sign in to comment.