Skip to content

Commit e5203f5

Browse files
committed
Merge branch 'main' into adjust-framerate
2 parents e2e577a + b714cb6 commit e5203f5

File tree

688 files changed

+21491
-12053
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

688 files changed

+21491
-12053
lines changed

.codecov.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
codecov:
2+
require_ci_to_pass: no
3+
notify:
4+
wait_for_ci: no
5+
6+
coverage:
7+
status:
8+
patch:
9+
default:
10+
target: 90%
11+
project:
12+
default:
13+
target: auto
14+
threshold: 2%
15+
16+
comment:
17+
layout: diff, flags, files
18+
require_changes: true

.eslintrc.json

Lines changed: 38 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,20 @@
1313
"allow": [],
1414
"depConstraints": [
1515
{
16-
"sourceTag": "*",
16+
"sourceTag": "type:app",
1717
"onlyDependOnLibsWithTags": ["*"]
18+
},
19+
{
20+
"sourceTag": "template",
21+
"onlyDependOnLibsWithTags": ["type:test-util", "cdk"]
22+
},
23+
{
24+
"sourceTag": "state",
25+
"onlyDependOnLibsWithTags": ["type:test-util", "cdk"]
26+
},
27+
{
28+
"sourceTag": "cdk",
29+
"onlyDependOnLibsWithTags": ["type:test-util"]
1830
}
1931
]
2032
}
@@ -23,16 +35,37 @@
2335
},
2436
{
2537
"files": ["*.ts", "*.tsx"],
26-
"extends": ["plugin:@nrwl/nx/typescript"],
38+
"extends": [
39+
"prettier",
40+
"eslint:recommended",
41+
"plugin:@nrwl/nx/typescript",
42+
"plugin:@angular-eslint/recommended",
43+
"plugin:@typescript-eslint/recommended"
44+
],
2745
"parserOptions": {
2846
"project": "./tsconfig.*?.json"
2947
},
30-
"rules": {}
48+
"rules": {
49+
"@typescript-eslint/ban-ts-comment": "warn",
50+
"@typescript-eslint/no-inferrable-types": "warn",
51+
"@typescript-eslint/ban-types": "warn",
52+
"@typescript-eslint/no-empty-interface": "warn",
53+
"@typescript-eslint/no-empty-function": "warn",
54+
"prefer-rest-params": "warn",
55+
"no-prototype-builtins": "warn",
56+
"no-empty": "warn"
57+
}
3158
},
3259
{
3360
"files": ["*.js", "*.jsx"],
34-
"extends": ["plugin:@nrwl/nx/javascript"],
35-
"rules": {}
61+
"extends": [
62+
"prettier",
63+
"plugin:@angular-eslint/template/recommended",
64+
"plugin:@nrwl/nx/javascript"
65+
],
66+
"rules": {
67+
"@typescript-eslint/no-non-null-assertion": "off"
68+
}
3669
}
3770
]
3871
}

.github/actions/setup/action.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Setup
2+
description: Setup Node.js, cache and install dependencies
3+
inputs:
4+
node-version:
5+
description: Node.js version
6+
required: false
7+
default: '14'
8+
runs:
9+
using: composite
10+
steps:
11+
- name: Checkout all commits
12+
uses: actions/checkout@v2
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Derive appropriate SHAs for base and head for `nx affected` commands
17+
uses: nrwl/nx-set-shas@v2
18+
19+
- name: Use Node.js
20+
uses: actions/setup-node@v2
21+
with:
22+
node-version: ${{ inputs.node-version }}
23+
24+
- uses: actions/cache@v2
25+
id: yarn-cache
26+
with:
27+
path: |
28+
node_modules
29+
~/.cache/Cypress
30+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
31+
restore-keys: |
32+
${{ runner.os }}-yarn-
33+
34+
- name: Install dependencies
35+
if: steps.yarn-cache.outputs.cache-hit != 'true'
36+
shell: bash
37+
run: yarn --frozen-lockfile --no-progress --non-interactive --prefer-offline
38+
env:
39+
HUSKY_SKIP_INSTALL: 'true'

.github/dependabot.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/poc/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ jobs:
2727
uses: actions/setup-node@v1
2828
with:
2929
node-version: ${{ matrix.node-version }}
30-
- run: git fetch --no-tags --prune --depth=5 origin master
30+
- run: git fetch --no-tags --prune --depth=5 origin main
3131
- name: set Environment Variables
3232
id: release
3333
run: |
3434
VERSION=$(node --eval="process.stdout.write(require('./libs/state/package.json').version)") # e.g. 2.4.2
3535
NEW_VERSION=$(node --eval="process.stdout.write(?)")
36-
if [ $REPOSITORY = "master" ]; then IS_PRE='false'; else IS_PRE='true'; fi
37-
if [ $REPOSITORY = "master" ]; then POSTFIX='' ; else POSTFIX='PRE'; fi
36+
if [ $REPOSITORY = "main" ]; then IS_PRE='false'; else IS_PRE='true'; fi
37+
if [ $REPOSITORY = "main" ]; then POSTFIX='' ; else POSTFIX='PRE'; fi
3838
RELEASEBODY=$(awk -v RS='Release ' '/'$VERSION':(.*)/')
3939
RELEASEBODY="${RELEASEBODY//'%'/'%25'}"
4040
RELEASEBODY="${RELEASEBODY//$'\n'/'%0A'}"

.github/workflows/build-and-test.yml

Lines changed: 54 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,90 @@
1-
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3-
41
name: rx-angular CI
52

63
on:
74
push:
8-
branches: [ master ]
5+
branches: [main]
96
pull_request:
10-
branches: [ master ]
7+
branches: [main]
118
env:
12-
node-version: 14.x
139
NX_CLOUD_DISTRIBUTED_EXECUTION: true
1410
NX_DISTRIBUTED_TASK_EXECUTION: true
15-
NX_VERBOSE_LOGGING: true
11+
NX_VERBOSE_LOGGING: false
1612

1713
jobs:
1814
agents:
1915
runs-on: ubuntu-latest
16+
2017
name: Agent 1
2118
timeout-minutes: 20
19+
2220
strategy:
2321
matrix:
24-
agent: [ 1, 2, 3 ]
22+
agent: [1, 2, 3]
23+
2524
steps:
2625
- uses: actions/checkout@v2
27-
28-
- name: Set up Node.js ${{ env.node-version }}
29-
uses: actions/setup-node@v2
30-
with:
31-
node-version: ${{ env.node-version }}
32-
33-
- uses: actions/cache@v2
34-
id: yarn-cache
35-
with:
36-
path: |
37-
node_modules
38-
~/.cache/Cypress
39-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
40-
restore-keys: |
41-
${{ runner.os }}-yarn-
42-
43-
- name: Install dependencies
44-
if: steps.yarn-cache.outputs.cache-hit != 'true'
45-
env:
46-
HUSKY_SKIP_INSTALL: 'true'
47-
run: yarn --frozen-lockfile --no-progress --non-interactive
26+
- uses: ./.github/actions/setup
4827

4928
- name: Start Nx Agent ${{ matrix.agent }}
50-
run: npx nx-cloud start-agent
51-
build:
29+
run: yarn nx-cloud start-agent
5230

31+
build:
5332
runs-on: ubuntu-latest
54-
steps:
55-
- uses: actions/checkout@v2
56-
name: Checkout [master]
57-
if: github.ref == 'refs/heads/master'
58-
with:
59-
fetch-depth: 0
6033

34+
steps:
6135
- uses: actions/checkout@v2
62-
name: Checkout [pr]
63-
if: github.ref != 'refs/heads/master'
64-
with:
65-
ref: ${{ github.event.pull_request.head.ref }}
66-
fetch-depth: 0
67-
68-
- name: Derive appropriate SHAs for base and head for `nx affected` commands
69-
uses: nrwl/nx-set-shas@v2
70-
with:
71-
main-branch-name: 'master'
72-
73-
- name: Set up Node.js ${{ env.node-version }}
74-
uses: actions/setup-node@v2
75-
with:
76-
node-version: ${{ env.node-version }}
36+
- uses: ./.github/actions/setup
7737

78-
- uses: actions/cache@v2
79-
id: yarn-cache
80-
with:
81-
path: |
82-
node_modules
83-
~/.cache/Cypress
84-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
85-
restore-keys: |
86-
${{ runner.os }}-yarn-
87-
88-
- name: Install dependencies
89-
if: steps.yarn-cache.outputs.cache-hit != 'true'
90-
env:
91-
HUSKY_SKIP_INSTALL: 'true'
92-
run: yarn --frozen-lockfile --no-progress --non-interactive
93-
94-
- run: npx nx-cloud start-ci-run
38+
- run: yarn nx-cloud start-ci-run
9539

9640
- name: Run Affected lint
9741
run: yarn nx affected:lint --parallel --maxParallel=3
9842

9943
- name: Run Affected test
100-
run: yarn nx affected:test --parallel --maxParallel=2
44+
run: yarn nx affected:test --parallel --maxParallel=3
45+
46+
- name: Run Affected e2e
47+
run: yarn nx affected:e2e
10148

102-
- name: Run SSR e2e
103-
run: yarn nx run ssr-e2e:e2e --headless
10449
# don't run build in parallel, can cause dead locks
10550
- name: Run Affected build
106-
run: yarn nx affected:build --with-deps
51+
run: yarn nx affected:build --parallel=false
10752

10853
- run: yarn nx-cloud stop-all-agents
10954

110-
- name: Tag main branch if all jobs succeed
111-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
112-
uses: nrwl/nx-tag-successful-ci-run@v1
55+
- name: Upload coverage to Codecov
56+
uses: codecov/codecov-action@v3
57+
with:
58+
token: ${{ secrets.CODECOV_TOKEN }}
59+
60+
build-docs:
61+
runs-on: ubuntu-latest
62+
63+
if: github.ref == 'refs/heads/main'
64+
65+
needs: [build]
66+
67+
steps:
68+
- uses: actions/checkout@v2
69+
- uses: ./.github/actions/setup
70+
71+
# @Notice: temporary skip Nx cloud for this job as it's hanging indefinitely in the CI.
72+
# - run: yarn nx-cloud start-ci-run
73+
74+
- run: NX_CLOUD_DISTRIBUTED_EXECUTION=false yarn nx run-many --projects=state,template,cdk --target=build-docs --parallel --maxParallel=3
75+
- run: NX_CLOUD_DISTRIBUTED_EXECUTION=false yarn nx build demos --prod
76+
77+
# @Notice: temporary skip Nx cloud for this job as it's hanging indefinitely in the CI.
78+
# - run: yarn nx-cloud stop-all-agents
79+
80+
- uses: EndBug/add-and-commit@v4
81+
with:
82+
add: 'docs/*'
83+
author_name: Github Action
84+
message: 'chore(docs): update GitHub pages'
85+
# Name of the branch to use, if different from the one that triggered the workflow
86+
# Default: the branch that triggered the workflow (from GITHUB_REF)
87+
ref: 'github-pages'
88+
env:
89+
# This is necessary in order to push a commit to the repo
90+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ master ]
16+
branches: [ main ]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ master ]
19+
branches: [ main ]
2020
schedule:
2121
- cron: '37 11 * * 2'
2222

.github/workflows/docs.yml

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +0,0 @@
1-
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
2-
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3-
4-
name: Build Docs
5-
6-
on:
7-
push:
8-
branches:
9-
- master
10-
11-
jobs:
12-
build-docs:
13-
14-
runs-on: ubuntu-latest
15-
16-
strategy:
17-
matrix:
18-
node-version: [12.x]
19-
20-
steps:
21-
- uses: actions/checkout@v2
22-
with:
23-
ref: ${{ github.event.pull_request.head.ref }}
24-
fetch-depth: 0
25-
- name: Use Node.js ${{ matrix.node-version }}
26-
uses: actions/setup-node@v1
27-
with:
28-
node-version: ${{ matrix.node-version }}
29-
- run: git fetch --no-tags --prune --depth=5 origin master
30-
- run: npm install --frozen-lockfile --non-interactive
31-
- run: npm run build-docs-page
32-
- run: npm run nx build demos --prod
33-
- uses: EndBug/add-and-commit@v4 # You can change this to use a specific version
34-
with:
35-
add: 'docs/*'
36-
force: true
37-
author_name: Github Action
38-
message: 'chore(docs): GitHub pages generation'
39-
# Whether to use the --force option on `git add`, in order to bypass eventual gitignores
40-
# Default: false
41-
#force: true
42-
# Name of the branch to use, if different from the one that triggered the workflow
43-
# Default: the branch that triggered the workflow (from GITHUB_REF)
44-
ref: 'github-pages'
45-
env:
46-
# This is necessary in order to push a commit to the repo
47-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this line unchanged

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ docs/demos
2929
!.vscode/extensions.json
3030

3131
# misc
32+
/.angular/cache
3233
/.sass-cache
3334
/connect.lock
3435
/coverage

.vscode/extensions.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"recommendations": [
33
"nrwl.angular-console",
44
"angular.ng-template",
5-
"ms-vscode.vscode-typescript-tslint-plugin",
65
"esbenp.prettier-vscode",
76
"firsttris.vscode-jest-runner"
87
]

0 commit comments

Comments
 (0)