@toptal/davinci-skeleton 6.2.1 → 6.2.2-alpha-fx-2755-split-it-workflow-in-two.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,21 +7,16 @@ on:
7
7
 
8
8
  # Read more about customization: https://toptal-core.atlassian.net/l/c/91SzvPoU#Generated-IT-Workflow
9
9
  env:
10
- # In monorepo if you want to run integration tests only for
11
- # specific subset of packages, define them in PARALLEL_MATRIX below
12
- # PARALLEL_MATRIX: |
13
- # [
14
- # {
15
- # "pkg": "@toptal/my-package",
16
- # "location": "packages/my-package",
17
- # "parallelGroups": 3
18
- # }
19
- # ]
20
- PARALLEL_GROUPS: 2
10
+ PARALLEL_MATRIX: |
11
+ [
12
+ {
13
+ "pkg": "@toptal/my-package",
14
+ "location": "packages/my-package",
15
+ "parallelGroups": 3
16
+ }
17
+ ]
21
18
  PRINT_COVERAGE: true
22
19
  COVERAGE_REPORT_DIR: coverage
23
- COVERAGE_REPORTER: text-summary
24
- COMMAND: test:integration:ci
25
20
 
26
21
  NPM_TOKEN: ${{ secrets.NPM_TOKEN_READ_ONLY }}
27
22
  GITHUB_TOKEN: ${{ secrets.TOPTAL_DEVBOT_TOKEN }}
@@ -50,12 +45,10 @@ jobs:
50
45
  id: set-matrix
51
46
  uses: ./.github/actions/create-matrix
52
47
  with:
53
- parallel-groups: ${{ env.PARALLEL_GROUPS }}
54
48
  parallel-matrix: ${{ env.PARALLEL_MATRIX }}
55
49
 
56
50
  outputs:
57
51
  matrix: ${{ steps.set-matrix.outputs.matrix }}
58
- is-monorepo: ${{ steps.set-matrix.outputs.is-monorepo }}
59
52
 
60
53
  integration_check:
61
54
  name: Check:IntegrationTests
@@ -77,11 +70,6 @@ jobs:
77
70
  - name: Setup node
78
71
  uses: actions/setup-node@v2
79
72
 
80
- - name: Set integration test command
81
- id: set-command
82
- run: |
83
- echo "::set-output name=command::yarn${{ needs.create_matrix.outputs.is-monorepo == 'true' && format(' {0} {1}', 'workspace', env.GROUP_PACKAGE) || ''}} ${{ env.COMMAND }}"
84
-
85
73
  - name: Checkout davinci GHAs
86
74
  uses: actions/checkout@v2
87
75
  with:
@@ -94,7 +82,7 @@ jobs:
94
82
 
95
83
  - uses: ./.github/actions/integration-tests
96
84
  with:
97
- command: ${{ steps.set-command.outputs.command }}
85
+ command: ${{ format('yarn workspace {0} test:integration:ci', env.GROUP_PACKAGE) }}
98
86
 
99
87
  - name: Move coverage output to joint folder
100
88
  if: ${{ env.PRINT_COVERAGE == 'true' }}
@@ -114,11 +102,19 @@ jobs:
114
102
  runs-on: ubuntu-latest
115
103
  needs: integration_check
116
104
  steps:
105
+ - name: Download Coverage
106
+ if: ${{ env.PRINT_COVERAGE == 'true' }}
107
+ uses: actions/download-artifact@v2
108
+ with:
109
+ name: integration-coverage
110
+ path: code-coverage
111
+
117
112
  - name: Checkout davinci GHAs
118
113
  uses: actions/checkout@v2
119
114
  with:
120
115
  repository: toptal/davinci-github-actions
121
- ref: v2.0.4
116
+ # TODO: Replace with new version tag when merged
117
+ ref: feat/refactor-report-coverage
122
118
  token: ${{ env.GITHUB_TOKEN }}
123
119
  path: ./.github/actions/
124
120
 
@@ -126,4 +122,5 @@ jobs:
126
122
  if: ${{ env.PRINT_COVERAGE == 'true' }}
127
123
  uses: ./.github/actions/report-coverage
128
124
  with:
129
- name: integration-coverage
125
+ path: code-coverage
126
+ reporter: text-summary
@@ -0,0 +1,110 @@
1
+ name: Integration tests
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, synchronize, reopened]
6
+ branches: [master, main]
7
+
8
+ # Read more about customization: https://toptal-core.atlassian.net/l/c/91SzvPoU#Generated-IT-Workflow
9
+ env:
10
+ PARALLEL_GROUPS: 2
11
+ PRINT_COVERAGE: true
12
+ COVERAGE_REPORT_DIR: coverage
13
+
14
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN_READ_ONLY }}
15
+ GITHUB_TOKEN: ${{ secrets.TOPTAL_DEVBOT_TOKEN }}
16
+
17
+ concurrency:
18
+ group: ${{ github.workflow }}-${{ github.ref }}
19
+ cancel-in-progress: true
20
+
21
+ jobs:
22
+ create_matrix:
23
+ name: Create:Matrix
24
+ runs-on: ubuntu-latest
25
+ steps:
26
+ - name: Checkout davinci GHAs
27
+ uses: actions/checkout@v2
28
+ with:
29
+ repository: toptal/davinci-github-actions
30
+ # TODO: Replace with new version tag when merged
31
+ ref: feat/create-index-array
32
+ token: ${{ env.GITHUB_TOKEN }}
33
+ path: ./.github/actions/
34
+
35
+ - name: Create Matrix
36
+ id: set-matrix
37
+ uses: ./.github/actions/create-array
38
+ with:
39
+ size: ${{ env.PARALLEL_GROUPS }}
40
+
41
+ outputs:
42
+ matrix: ${{ steps.set-matrix.outputs.array }}
43
+
44
+ integration_check:
45
+ name: Check:IntegrationTests
46
+ runs-on: ubuntu-latest
47
+ needs: [create_matrix]
48
+ strategy:
49
+ fail-fast: false
50
+ matrix:
51
+ index: ${{ fromJson(needs.create_matrix.outputs.matrix) }}
52
+ env:
53
+ GROUP_INDEX: ${{ matrix.index }}
54
+ GROUP_PACKAGE: ${{ matrix.pkg }}
55
+ PARALLEL_GROUPS: ${{ matrix.total }}
56
+ steps:
57
+ - name: Checkout project
58
+ uses: actions/checkout@v2
59
+
60
+ - name: Setup node
61
+ uses: actions/setup-node@v2
62
+
63
+ - name: Checkout davinci GHAs
64
+ uses: actions/checkout@v2
65
+ with:
66
+ repository: toptal/davinci-github-actions
67
+ ref: v2.0.4
68
+ token: ${{ env.GITHUB_TOKEN }}
69
+ path: ./.github/actions/
70
+
71
+ - uses: ./.github/actions/yarn-install
72
+
73
+ - uses: ./.github/actions/integration-tests
74
+ with:
75
+ command: yarn test:integration:ci
76
+
77
+ - name: Upload Coverage
78
+ if: ${{ env.PRINT_COVERAGE == 'true' }}
79
+ uses: actions/upload-artifact@v2
80
+ with:
81
+ name: integration-coverage
82
+ path: $COVERAGE_REPORT_DIR/coverage-final.json
83
+
84
+ coverage_report:
85
+ name: Report:Coverage
86
+ runs-on: ubuntu-latest
87
+ needs: integration_check
88
+ steps:
89
+ - name: Download Coverage
90
+ if: ${{ env.PRINT_COVERAGE == 'true' }}
91
+ uses: actions/download-artifact@v2
92
+ with:
93
+ name: integration-coverage
94
+ path: code-coverage
95
+
96
+ - name: Checkout davinci GHAs
97
+ uses: actions/checkout@v2
98
+ with:
99
+ repository: toptal/davinci-github-actions
100
+ # TODO: Replace with new version tag when merged
101
+ ref: feat/refactor-report-coverage
102
+ token: ${{ env.GITHUB_TOKEN }}
103
+ path: ./.github/actions/
104
+
105
+ - name: Print Coverage
106
+ if: ${{ env.PRINT_COVERAGE == 'true' }}
107
+ uses: ./.github/actions/report-coverage
108
+ with:
109
+ path: code-coverage
110
+ reporter: text-summary
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toptal/davinci-skeleton",
3
- "version": "6.2.1",
3
+ "version": "6.2.2-alpha-fx-2755-split-it-workflow-in-two.1+e38f64c4",
4
4
  "description": "Toptal frontend application created with Davinci CLI",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -9,7 +9,7 @@
9
9
  "homepage": "https://github.com/toptal/davinci/tree/master/packages/bootstrap#readme",
10
10
  "license": "ISC",
11
11
  "devDependencies": {
12
- "@toptal/browserslist-config": "^1.2.0",
12
+ "@toptal/browserslist-config": "1.2.1-alpha-fx-2755-split-it-workflow-in-two.287+e38f64c4",
13
13
  "@types/jest": "^27.4.1",
14
14
  "@types/react": "^18.0.7",
15
15
  "@types/react-dom": "^16.8.4",
@@ -47,5 +47,6 @@
47
47
  ]
48
48
  },
49
49
  "sideEffects": false,
50
- "main": "./src/index.tsx"
50
+ "main": "./src/index.tsx",
51
+ "gitHead": "e38f64c40fc6dbad4bff8836e797a52bc6320d29"
51
52
  }
@@ -1,51 +0,0 @@
1
- {
2
- "name": "@toptal/davinci-skeleton",
3
- "version": "6.2.1",
4
- "description": "Toptal frontend application created with Davinci CLI",
5
- "publishConfig": {
6
- "access": "public"
7
- },
8
- "author": "Toptal",
9
- "homepage": "https://github.com/toptal/davinci/tree/master/packages/bootstrap#readme",
10
- "license": "ISC",
11
- "devDependencies": {
12
- "@toptal/browserslist-config": "^1.2.0",
13
- "@types/jest": "^27.4.1",
14
- "@types/react": "^18.0.7",
15
- "@types/react-dom": "^16.8.4",
16
- "@types/styled-components": "^5.1.25",
17
- "wait-on": "^6.0.1",
18
- "yarn-deduplicate": "^4.0.0"
19
- },
20
- "scripts": {
21
- "analyze": "davinci engine analyze",
22
- "build": "davinci engine build",
23
- "start": "PORT=3000 davinci engine start --https --open-url https://local-development.staging.toptal.net:3000",
24
- "start:ci": "PORT=3000 davinci engine start --https",
25
- "test": "davinci qa unit --runInBand true",
26
- "test:ci": "LANG=en_US davinci qa unit --ci --maxWorkers 100% --testTimeout=10000 --silent",
27
- "test:integration": "NODE_ENV=development davinci qa e2e --baseUrl=https://local-development.staging.toptal.net:3000",
28
- "test:integration:ci": "yarn start:ci & wait-on -i 10000 https://local-development.staging.toptal.net:3000 && yarn test:integration",
29
- "test:e2e": "yarn test:integration",
30
- "test:e2e:ci": "yarn test:integration:ci",
31
- "lint": "davinci syntax lint code . && davinci syntax lint styles .",
32
- "typecheck": "tsc --noEmit",
33
- "prepublish": "if [ -f 'yarn.lock' ]; then yarn-deduplicate yarn.lock; fi",
34
- "build:package": "../../bin/build-package.js",
35
- "prepack": "./bin/prepack-skeleton",
36
- "postpack": "./bin/postpack-skeleton",
37
- "prepublishOnly": "../../bin/prepublish.js"
38
- },
39
- "lint-staged": {
40
- "*.{js,jsx,ts,tsx}": [
41
- "davinci syntax lint code",
42
- "prettier --write"
43
- ],
44
- "styles.{js,jsx,ts,tsx}": [
45
- "davinci syntax lint styles",
46
- "prettier --write"
47
- ]
48
- },
49
- "sideEffects": false,
50
- "main": "./src/index.tsx"
51
- }
@@ -1,51 +0,0 @@
1
- {
2
- "name": "@toptal/davinci-skeleton",
3
- "version": "6.2.1",
4
- "description": "Toptal frontend application created with Davinci CLI",
5
- "publishConfig": {
6
- "access": "public"
7
- },
8
- "author": "Toptal",
9
- "homepage": "https://github.com/toptal/davinci/tree/master/packages/bootstrap#readme",
10
- "license": "ISC",
11
- "devDependencies": {
12
- "@toptal/browserslist-config": "^1.2.0",
13
- "@types/jest": "^27.4.1",
14
- "@types/react": "^18.0.7",
15
- "@types/react-dom": "^16.8.4",
16
- "@types/styled-components": "^5.1.25",
17
- "wait-on": "^6.0.1",
18
- "yarn-deduplicate": "^4.0.0"
19
- },
20
- "scripts": {
21
- "analyze": "davinci engine analyze",
22
- "build": "davinci engine build",
23
- "start": "PORT=3000 davinci engine start --https --open-url https://local-development.staging.toptal.net:3000",
24
- "start:ci": "PORT=3000 davinci engine start --https",
25
- "test": "davinci qa unit --runInBand true",
26
- "test:ci": "LANG=en_US davinci qa unit --ci --maxWorkers 100% --testTimeout=10000 --silent",
27
- "test:integration": "NODE_ENV=development davinci qa e2e --baseUrl=https://local-development.staging.toptal.net:3000",
28
- "test:integration:ci": "yarn start:ci & wait-on -i 10000 https://local-development.staging.toptal.net:3000 && yarn test:integration",
29
- "test:e2e": "yarn test:integration",
30
- "test:e2e:ci": "yarn test:integration:ci",
31
- "lint": "davinci syntax lint code . && davinci syntax lint styles .",
32
- "typecheck": "tsc --noEmit",
33
- "prepublish": "if [ -f 'yarn.lock' ]; then yarn-deduplicate yarn.lock; fi",
34
- "build:package": "../../bin/build-package.js",
35
- "prepack": "./bin/prepack-skeleton",
36
- "postpack": "./bin/postpack-skeleton",
37
- "prepublishOnly": "../../bin/prepublish.js"
38
- },
39
- "lint-staged": {
40
- "*.{js,jsx,ts,tsx}": [
41
- "davinci syntax lint code",
42
- "prettier --write"
43
- ],
44
- "styles.{js,jsx,ts,tsx}": [
45
- "davinci syntax lint styles",
46
- "prettier --write"
47
- ]
48
- },
49
- "sideEffects": false,
50
- "main": "./src/index.tsx"
51
- }