@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.
- package/.github/workflows/davinci-alpha-package.yml +1 -1
- package/.github/workflows/davinci-danger.yml +1 -1
- package/.github/workflows/davinci-deploy-production.yml +1 -1
- package/.github/workflows/davinci-deploy-staging.yml +1 -1
- package/.github/workflows/davinci-deploy-temploy.yml +2 -2
- package/.github/workflows/davinci-deploy.yml +2 -2
- package/.github/{codebase-specific-workflows/monorepo → workflows}/davinci-integration-tests.yml +25 -22
- package/.github/workflows/davinci-lint.yml +1 -1
- package/.github/workflows/davinci-typecheck.yml +1 -1
- package/.github/workflows/davinci-unit-tests.yml +1 -1
- package/.prettierrc.js +1 -1
- package/package.json +5 -4
- package/src/modules/documentation/components/Container/Container.tsx +1 -1
- package/src/modules/welcome/components/CountriesList/CountriesList.tsx +1 -1
- package/src/modules/welcome/components/CountriesList/data/get-countries/mocks.ts +6 -6
- package/src/modules/welcome/components/CountriesList/test.tsx +7 -7
- package/src/modules/welcome/pages/WelcomePage/WelcomePage.tsx +1 -1
- package/src/modules/welcome/pages/WelcomePage/test.tsx +1 -1
- package/.github/codebase-specific-workflows/spa/davinci-integration-tests.yml +0 -112
|
@@ -64,7 +64,7 @@ jobs:
|
|
|
64
64
|
- uses: actions/checkout@v2
|
|
65
65
|
with:
|
|
66
66
|
repository: toptal/davinci-github-actions
|
|
67
|
-
ref: v2.
|
|
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.
|
|
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.
|
|
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.
|
|
98
|
+
ref: v2.0.4
|
|
99
99
|
token: ${{ env.GITHUB_TOKEN }}
|
|
100
100
|
path: ./.github/actions/
|
|
101
101
|
|
package/.github/{codebase-specific-workflows/monorepo → workflows}/davinci-integration-tests.yml
RENAMED
|
@@ -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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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.
|
|
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.
|
|
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: ${{
|
|
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.
|
|
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
|
-
|
|
126
|
-
reporter: text-summary
|
|
129
|
+
name: integration-coverage
|
package/.prettierrc.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toptal/davinci-skeleton",
|
|
3
|
-
"version": "7.0.1-alpha-fx-2755-
|
|
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-
|
|
13
|
-
"@types/jest": "^27.
|
|
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": "
|
|
51
|
+
"gitHead": "46405792bfc49fdb4b954b2ca9ddbb9ce8660801"
|
|
51
52
|
}
|
|
@@ -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)
|
|
@@ -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
|