@toptal/davinci-skeleton 7.0.1-alpha-fx-2755-codebase-specific-workflows.20 → 7.0.1-alpha-fx-2755-interactive-workflow-generation.23

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.
@@ -50,7 +50,7 @@ jobs:
50
50
  uses: actions/checkout@v2
51
51
  with:
52
52
  repository: toptal/davinci-github-actions
53
- ref: v2.2.0
53
+ ref: v2.0.4
54
54
  token: ${{ env.GITHUB_TOKEN }}
55
55
  path: ./.github/actions/
56
56
 
@@ -26,7 +26,7 @@ jobs:
26
26
  uses: actions/checkout@v2
27
27
  with:
28
28
  repository: toptal/davinci-github-actions
29
- ref: v2.2.0
29
+ ref: v2.0.4
30
30
  token: ${{ env.GITHUB_TOKEN }}
31
31
  path: ./.github/actions/
32
32
 
@@ -49,7 +49,7 @@ jobs:
49
49
  - uses: actions/checkout@v2
50
50
  with:
51
51
  repository: toptal/davinci-github-actions
52
- ref: v2.2.0
52
+ ref: v2.0.4
53
53
  token: ${{ env.GITHUB_TOKEN }}
54
54
  path: ./.github/actions/
55
55
 
@@ -47,7 +47,7 @@ jobs:
47
47
  - uses: actions/checkout@v2
48
48
  with:
49
49
  repository: toptal/davinci-github-actions
50
- ref: v2.2.0
50
+ ref: v2.0.4
51
51
  token: ${{ env.GITHUB_TOKEN }}
52
52
  path: ./.github/actions/
53
53
 
@@ -64,7 +64,7 @@ jobs:
64
64
  - uses: actions/checkout@v2
65
65
  with:
66
66
  repository: toptal/davinci-github-actions
67
- ref: v2.2.0
67
+ ref: v2.0.4
68
68
  token: ${{ env.GITHUB_TOKEN }}
69
69
  path: ./.github/actions/
70
70
 
@@ -129,7 +129,7 @@ jobs:
129
129
  - uses: actions/checkout@v2
130
130
  with:
131
131
  repository: toptal/davinci-github-actions
132
- ref: v2.2.0
132
+ ref: v2.0.4
133
133
  token: ${{ env.GITHUB_TOKEN }}
134
134
  path: ./.github/actions/
135
135
 
@@ -38,7 +38,7 @@ jobs:
38
38
  - uses: actions/checkout@v2
39
39
  with:
40
40
  repository: toptal/davinci-github-actions
41
- ref: v2.2.0
41
+ ref: v2.0.4
42
42
  token: ${{ env.GITHUB_TOKEN }}
43
43
  path: ./.github/actions/
44
44
 
@@ -95,7 +95,7 @@ jobs:
95
95
  - uses: actions/checkout@v2
96
96
  with:
97
97
  repository: toptal/davinci-github-actions
98
- ref: v2.2.0
98
+ ref: v2.0.4
99
99
  token: ${{ env.GITHUB_TOKEN }}
100
100
  path: ./.github/actions/
101
101
 
@@ -7,16 +7,20 @@ on:
7
7
 
8
8
  # Read more about customization: https://toptal-core.atlassian.net/l/c/91SzvPoU#Generated-IT-Workflow
9
9
  env:
10
- PARALLEL_MATRIX: |
11
- [
12
- {
13
- "pkg": "@toptal/my-package",
14
- "location": "packages/my-package",
15
- "parallelGroups": 3
16
- }
17
- ]
18
- PRINT_COVERAGE: false
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
21
+ PRINT_COVERAGE: true
19
22
  COVERAGE_REPORT_DIR: coverage
23
+ COVERAGE_REPORTER: text-summary
20
24
  COMMAND: test:integration:ci
21
25
 
22
26
  NPM_TOKEN: ${{ secrets.NPM_TOKEN_READ_ONLY }}
@@ -38,7 +42,7 @@ jobs:
38
42
  uses: actions/checkout@v2
39
43
  with:
40
44
  repository: toptal/davinci-github-actions
41
- ref: v2.2.0
45
+ ref: v2.0.4
42
46
  token: ${{ env.GITHUB_TOKEN }}
43
47
  path: ./.github/actions/
44
48
 
@@ -46,10 +50,12 @@ jobs:
46
50
  id: set-matrix
47
51
  uses: ./.github/actions/create-matrix
48
52
  with:
53
+ parallel-groups: ${{ env.PARALLEL_GROUPS }}
49
54
  parallel-matrix: ${{ env.PARALLEL_MATRIX }}
50
55
 
51
56
  outputs:
52
57
  matrix: ${{ steps.set-matrix.outputs.matrix }}
58
+ is-monorepo: ${{ steps.set-matrix.outputs.is-monorepo }}
53
59
 
54
60
  integration_check:
55
61
  name: Check:IntegrationTests
@@ -71,11 +77,16 @@ jobs:
71
77
  - name: Setup node
72
78
  uses: actions/setup-node@v2
73
79
 
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
+
74
85
  - name: Checkout davinci GHAs
75
86
  uses: actions/checkout@v2
76
87
  with:
77
88
  repository: toptal/davinci-github-actions
78
- ref: v2.2.0
89
+ ref: v2.0.4
79
90
  token: ${{ env.GITHUB_TOKEN }}
80
91
  path: ./.github/actions/
81
92
 
@@ -83,7 +94,7 @@ jobs:
83
94
 
84
95
  - uses: ./.github/actions/integration-tests
85
96
  with:
86
- command: ${{ format('yarn workspace {0} {1}', env.GROUP_PACKAGE, env.COMMAND) }}
97
+ command: ${{ steps.set-command.outputs.command }}
87
98
 
88
99
  - name: Move coverage output to joint folder
89
100
  if: ${{ env.PRINT_COVERAGE == 'true' }}
@@ -103,18 +114,11 @@ jobs:
103
114
  runs-on: ubuntu-latest
104
115
  needs: integration_check
105
116
  steps:
106
- - name: Download Coverage
107
- if: ${{ env.PRINT_COVERAGE == 'true' }}
108
- uses: actions/download-artifact@v2
109
- with:
110
- name: integration-coverage
111
- path: code-coverage
112
-
113
117
  - name: Checkout davinci GHAs
114
118
  uses: actions/checkout@v2
115
119
  with:
116
120
  repository: toptal/davinci-github-actions
117
- ref: v2.2.0
121
+ ref: v2.0.4
118
122
  token: ${{ env.GITHUB_TOKEN }}
119
123
  path: ./.github/actions/
120
124
 
@@ -122,5 +126,4 @@ jobs:
122
126
  if: ${{ env.PRINT_COVERAGE == 'true' }}
123
127
  uses: ./.github/actions/report-coverage
124
128
  with:
125
- path: code-coverage
126
- reporter: text-summary
129
+ name: integration-coverage
@@ -22,7 +22,7 @@ jobs:
22
22
  uses: actions/checkout@v2
23
23
  with:
24
24
  repository: toptal/davinci-github-actions
25
- ref: v2.2.0
25
+ ref: v2.0.4
26
26
  token: ${{ env.GITHUB_TOKEN }}
27
27
  path: ./.github/actions/
28
28
 
@@ -22,7 +22,7 @@ jobs:
22
22
  - uses: actions/checkout@v2
23
23
  with:
24
24
  repository: toptal/davinci-github-actions
25
- ref: v2.2.0
25
+ ref: v2.0.4
26
26
  token: ${{ env.GITHUB_TOKEN }}
27
27
  path: ./.github/actions/
28
28
 
@@ -36,7 +36,7 @@ jobs:
36
36
  - uses: actions/checkout@v2
37
37
  with:
38
38
  repository: toptal/davinci-github-actions
39
- ref: v2.2.0
39
+ ref: v2.0.4
40
40
  token: ${{ env.GITHUB_TOKEN }}
41
41
  path: ./.github/actions/
42
42
 
package/.prettierrc.js CHANGED
@@ -1,3 +1,3 @@
1
1
  module.exports = {
2
- ...require('@toptal/davinci-syntax/src/configs/.prettierrc.js')
2
+ ...require('@toptal/davinci-syntax/src/configs/.prettierrc.js'),
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toptal/davinci-skeleton",
3
- "version": "7.0.1-alpha-fx-2755-codebase-specific-workflows.20+b2bc74b6",
3
+ "version": "7.0.1-alpha-fx-2755-interactive-workflow-generation.23+46405792",
4
4
  "description": "Toptal frontend application created with Davinci CLI",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -9,12 +9,13 @@
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.1-alpha-fx-2755-codebase-specific-workflows.315+b2bc74b6",
13
- "@types/jest": "^27.4.1",
12
+ "@toptal/browserslist-config": "1.2.1-alpha-fx-2755-interactive-workflow-generation.318+46405792",
13
+ "@types/jest": "^27.5.1",
14
14
  "@types/react": "^18.0.7",
15
15
  "@types/react-dom": "^18.0.4",
16
16
  "@types/styled-components": "^5.1.25",
17
17
  "@types/wait-on": "^5.3.1",
18
+ "jest-environment-jsdom": "^28.1.0",
18
19
  "wait-on": "^6.0.1",
19
20
  "yarn-deduplicate": "^4.0.0"
20
21
  },
@@ -47,5 +48,5 @@
47
48
  },
48
49
  "sideEffects": false,
49
50
  "main": "./src/index.tsx",
50
- "gitHead": "b2bc74b6947156d1489a42f820be1832f53b870d"
51
+ "gitHead": "46405792bfc49fdb4b954b2ca9ddbb9ce8660801"
51
52
  }
@@ -4,7 +4,7 @@ import { Container as PicassoContainer, ContainerProps } from '@toptal/picasso'
4
4
  const Container = ({
5
5
  children,
6
6
  top,
7
- bottom
7
+ bottom,
8
8
  }: Pick<ContainerProps, 'top' | 'bottom' | 'children'>) => (
9
9
  <PicassoContainer top={top} bottom={bottom}>
10
10
  {children}
@@ -13,7 +13,7 @@ const AddressDetails = () => {
13
13
  const {
14
14
  loading: countriesLoading,
15
15
  data: countriesData,
16
- error
16
+ error,
17
17
  } = useGetCountries()
18
18
 
19
19
  useEffect(() => {
@@ -14,7 +14,7 @@ export const createGetCountriesMock = (
14
14
  error?: Error
15
15
  ) => ({
16
16
  request: {
17
- query: GET_COUNTRIES
17
+ query: GET_COUNTRIES,
18
18
  },
19
19
  result: mockData
20
20
  ? {
@@ -23,11 +23,11 @@ export const createGetCountriesMock = (
23
23
  __typename: 'CountryConnection',
24
24
  nodes: mockData.countries.nodes.map(node => ({
25
25
  ...node,
26
- __typename: 'Country'
27
- }))
28
- }
29
- }
26
+ __typename: 'Country',
27
+ })),
28
+ },
29
+ },
30
30
  }
31
31
  : undefined,
32
- error
32
+ error,
33
33
  })
@@ -14,8 +14,8 @@ jest.mock('@toptal/picasso/utils', () => {
14
14
  __esModule: true,
15
15
  ...actualPicassoUtils,
16
16
  useNotifications: () => ({
17
- showError: mockedShowError
18
- })
17
+ showError: mockedShowError,
18
+ }),
19
19
  }
20
20
  })
21
21
 
@@ -40,10 +40,10 @@ describe('CountriesList', () => {
40
40
  nodes: [
41
41
  {
42
42
  id: '1',
43
- googleName: countryName
44
- }
45
- ]
46
- }
43
+ googleName: countryName,
44
+ },
45
+ ],
46
+ },
47
47
  }
48
48
 
49
49
  it('shows list of countries', async () => {
@@ -58,7 +58,7 @@ describe('CountriesList', () => {
58
58
  describe('when getting countries list failed', () => {
59
59
  beforeEach(async () => {
60
60
  const mocks = [
61
- createGetCountriesMock(undefined, new Error('Something went wrong.'))
61
+ createGetCountriesMock(undefined, new Error('Something went wrong.')),
62
62
  ]
63
63
 
64
64
  renderCountriesList(mocks)
@@ -14,7 +14,7 @@ const TOPTAL_ARCHITECTURE_GUIDELINES_DOC_URL =
14
14
  const TOPTAL_PICASSO_URL = 'https://picasso.toptal.net'
15
15
 
16
16
  export enum TestId {
17
- Image = 'image'
17
+ Image = 'image',
18
18
  }
19
19
 
20
20
  const WelcomePage = () => {
@@ -6,7 +6,7 @@ import packageJson from '../../../../../package.json'
6
6
 
7
7
  jest.mock('../../components', () => ({
8
8
  __esModule: true,
9
- CountriesList: () => null
9
+ CountriesList: () => null,
10
10
  }))
11
11
 
12
12
  const expectParagraphWithLinkIsFound = (text: string, link: string) => {
@@ -1,112 +0,0 @@
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: false
12
- COVERAGE_REPORT_DIR: coverage
13
- COMMAND: test:integration:ci
14
-
15
- NPM_TOKEN: ${{ secrets.NPM_TOKEN_READ_ONLY }}
16
- GITHUB_TOKEN: ${{ secrets.TOPTAL_DEVBOT_TOKEN }}
17
-
18
- concurrency:
19
- group: ${{ github.workflow }}-${{ github.ref }}
20
- cancel-in-progress: true
21
-
22
- jobs:
23
- create_matrix:
24
- name: Create:Matrix
25
- runs-on: ubuntu-latest
26
- steps:
27
- - name: Checkout project
28
- uses: actions/checkout@v2
29
-
30
- - name: Checkout davinci GHAs
31
- uses: actions/checkout@v2
32
- with:
33
- repository: toptal/davinci-github-actions
34
- ref: v2.2.0
35
- token: ${{ env.GITHUB_TOKEN }}
36
- path: ./.github/actions/
37
-
38
- - name: Run Matrix
39
- id: set-matrix
40
- uses: ./.github/actions/create-matrix
41
- with:
42
- parallel-groups: ${{ env.PARALLEL_GROUPS }}
43
-
44
- outputs:
45
- matrix: ${{ steps.set-matrix.outputs.matrix }}
46
-
47
- integration_check:
48
- name: Check:IntegrationTests
49
- runs-on: ubuntu-latest
50
- needs: [create_matrix]
51
- strategy:
52
- fail-fast: false
53
- matrix:
54
- index: ${{ fromJson(needs.create_matrix.outputs.matrix) }}
55
- env:
56
- GROUP_INDEX: ${{ matrix.index }}
57
- GROUP_PACKAGE: ${{ matrix.pkg }}
58
- PARALLEL_GROUPS: ${{ matrix.total }}
59
- steps:
60
- - name: Checkout project
61
- uses: actions/checkout@v2
62
-
63
- - name: Setup node
64
- uses: actions/setup-node@v2
65
-
66
- - name: Checkout davinci GHAs
67
- uses: actions/checkout@v2
68
- with:
69
- repository: toptal/davinci-github-actions
70
- ref: v2.2.0
71
- token: ${{ env.GITHUB_TOKEN }}
72
- path: ./.github/actions/
73
-
74
- - uses: ./.github/actions/yarn-install
75
-
76
- - uses: ./.github/actions/integration-tests
77
- with:
78
- command: yarn ${{ env.COMMAND }}
79
-
80
- - name: Upload Coverage
81
- if: ${{ env.PRINT_COVERAGE == 'true' }}
82
- uses: actions/upload-artifact@v2
83
- with:
84
- name: integration-coverage
85
- path: $COVERAGE_REPORT_DIR/coverage-final.json
86
-
87
- coverage_report:
88
- name: Report:Coverage
89
- runs-on: ubuntu-latest
90
- needs: integration_check
91
- steps:
92
- - name: Download Coverage
93
- if: ${{ env.PRINT_COVERAGE == 'true' }}
94
- uses: actions/download-artifact@v2
95
- with:
96
- name: integration-coverage
97
- path: code-coverage
98
-
99
- - name: Checkout davinci GHAs
100
- uses: actions/checkout@v2
101
- with:
102
- repository: toptal/davinci-github-actions
103
- ref: v2.2.0
104
- token: ${{ env.GITHUB_TOKEN }}
105
- path: ./.github/actions/
106
-
107
- - name: Print Coverage
108
- if: ${{ env.PRINT_COVERAGE == 'true' }}
109
- uses: ./.github/actions/report-coverage
110
- with:
111
- path: code-coverage
112
- reporter: text-summary