Skip to content

Commit faffb38

Browse files
authored
Merge branch 'main' into imma/api-crud-operations
2 parents 82fcf5f + dc6943c commit faffb38

File tree

1,213 files changed

+43820
-3785
lines changed

Some content is hidden

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

1,213 files changed

+43820
-3785
lines changed

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ node_modules/
44
docs/sources/get-started/run-cloud-tests-from-the-CLI.md
55
docs/sources/get-started/run-your-first-tests.md
66
CONTRIBUTING_FILE_FORMAT.md
7+
src/data/markdown/docs/40 xk6-disruptor/01 Get started/01 Welcome.md
8+
src/data/markdown/docs/40 xk6-disruptor/01 Get started/04 Expose Your Application.md
79
src/data/markdown/docs/40 xk6-disruptor/04 Examples/01 Inject Grpc faults into Service.md
810
src/data/markdown/docs/40 xk6-disruptor/04 Examples/02 Inject HTTP faults into Pod.md
911
src/data/markdown/docs/05 Examples/01 Examples/10 api-crud-operations.md
12+
src/data/markdown/docs/05 Examples/02 Tutorials/01 Get started with k6/100 Test-for-functional-behavior.md
13+
src/data/markdown/docs/05 Examples/02 Tutorials/01 Get started with k6/200 Test for performance.md
14+
src/data/markdown/docs/05 Examples/02 Tutorials/01 Get started with k6/400 Reuse and re-run tests.md

.github/workflows/pr-deploy.yml

Lines changed: 43 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -15,38 +15,20 @@ on:
1515
branches: main
1616

1717
jobs:
18-
update-dependencies:
19-
name: Update node module dependencies
20-
runs-on: ubuntu-latest
21-
steps:
22-
- name: Checkout project
23-
uses: actions/checkout@v2
24-
- name: Use Node.js 16.xs
25-
uses: actions/setup-node@v2
26-
with:
27-
node-version: '16.x'
28-
registry-url: 'https://registry.npmjs.org'
29-
- name: Restore cache
30-
uses: actions/cache@v2
31-
with:
32-
path: '**/node_modules'
33-
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
34-
- name: Install dependencies
35-
run: npm install
3618
lint:
3719
name: Lint code
38-
needs: [update-dependencies]
3920
runs-on: ubuntu-latest
4021
steps:
4122
- name: Checkout project
42-
uses: actions/checkout@v2
23+
uses: actions/checkout@v3
4324
- name: Use Node.js 16.xs
44-
uses: actions/setup-node@v2
25+
uses: actions/setup-node@v3
4526
with:
4627
node-version: '16.x'
4728
registry-url: 'https://registry.npmjs.org'
29+
cache: 'npm'
4830
- name: Restore cache
49-
uses: actions/cache@v2
31+
uses: actions/cache@v3
5032
with:
5133
path: '**/node_modules'
5234
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
@@ -65,7 +47,7 @@ jobs:
6547
name: Lint prose
6648
runs-on: ubuntu-latest
6749
steps:
68-
- uses: actions/checkout@v2
50+
- uses: actions/checkout@v3
6951
- uses: errata-ai/vale-action@reviewdog
7052
env:
7153
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
@@ -75,11 +57,11 @@ jobs:
7557
fail_on_error: true
7658
vale_flags: '--glob=**/{docs,translated-guides/en}/**/*.md'
7759
build:
78-
name: Build pull request
60+
name: Build and deploy pull request
7961
runs-on: ubuntu-latest
8062
needs: lint
8163
steps:
82-
- uses: actions/checkout@v2
64+
- uses: actions/checkout@v3
8365

8466
- name: Print build settings
8567
run: |
@@ -90,63 +72,71 @@ jobs:
9072
echo "GATSBY_DEFAULT_APP_URL: $GATSBY_DEFAULT_APP_URL"
9173
9274
- name: Use Node.js 16.xs
93-
uses: actions/setup-node@v2
75+
uses: actions/setup-node@v3
9476
with:
9577
node-version: '16.x'
9678
registry-url: 'https://registry.npmjs.org'
79+
cache: 'npm'
80+
81+
- name: Restore node_modules cache
82+
uses: actions/cache@v3
83+
with:
84+
path: '**/node_modules'
85+
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
9786

9887
- name: Install
9988
run: npm install
10089

101-
- name: Build
102-
run: npm run build
103-
104-
- name: Upload artifact
105-
uses: actions/upload-artifact@v2
90+
- name: Restore build cache
91+
uses: actions/cache@v3
10692
with:
107-
name: k6-docs
108-
path: public/
109-
retention-days: 1
93+
# Gatsby requires both .cache and public. It will refuse to use .cache/ if public/ is not present.
94+
path: |
95+
.cache
96+
public
97+
# Cache will not be used by Gatsby if the following files change:
98+
# https://www.gatsbyjs.com/docs/build-caching/
99+
key: pr-gatsby-${{ hashFiles('package.json', 'gatsby-config.js', 'gatsby-node.js') }}-${{ github.ref }}
100+
restore-keys: |
101+
pr-gatsby-${{ hashFiles('package.json', 'gatsby-config.js', 'gatsby-node.js') }}-
110102
111-
deploy:
112-
name: Deploy pull request
113-
runs-on: ubuntu-latest
114-
needs: [build]
115-
if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]'
116-
env:
117-
AWS_ACCESS_KEY_ID: ${{ secrets.PR_CI_AWS_ACCESS_KEY }}
118-
AWS_SECRET_ACCESS_KEY: ${{ secrets.PR_CI_AWS_SECRET_KEY }}
119-
AWS_REGION: 'eu-west-1'
120-
121-
steps:
122-
- name: Download artifact
123-
uses: actions/download-artifact@v2
124-
with:
125-
name: k6-docs
126-
path: public/
103+
- name: Build
104+
run: npm run build
127105

128106
- name: Sync to S3
107+
id: upload
108+
# Run only if PR does not come from a fork and it is not from dependabot.
109+
if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]'
129110
uses: jakejarvis/[email protected]
130111
with:
131112
args: --delete
132113
env:
114+
AWS_ACCESS_KEY_ID: ${{ secrets.PR_CI_AWS_ACCESS_KEY }}
115+
AWS_SECRET_ACCESS_KEY: ${{ secrets.PR_CI_AWS_SECRET_KEY }}
116+
AWS_REGION: 'eu-west-1'
133117
AWS_S3_BUCKET: ${{ secrets.PR_CI_AWS_S3_BUCKET }}
134118
SOURCE_DIR: public/
135119
DEST_DIR: docs/${{ github.ref }}
136120

137121
- name: Invalidate Cloudfront
122+
# Run only if we did not skip the upload step
123+
if: steps.upload.outcome == 'success'
138124
uses: chetan/[email protected]
139125
env:
126+
AWS_ACCESS_KEY_ID: ${{ secrets.PR_CI_AWS_ACCESS_KEY }}
127+
AWS_SECRET_ACCESS_KEY: ${{ secrets.PR_CI_AWS_SECRET_KEY }}
128+
AWS_REGION: 'eu-west-1'
140129
DISTRIBUTION: ${{ secrets.PR_CI_CLOUDFRONT_DISTRIBUTION_ID }}
141130
PATHS: '/docs/*'
142131

143132
- name: Post published URL to PR
144-
if: github.event.action == 'opened'
145-
uses: actions/[email protected]
133+
# Run only if we did not skip the upload step and it's the first run for this PR.
134+
if: steps.upload.outcome == 'success' && github.event.action == 'opened'
135+
uses: actions/github-script@v6
146136
with:
147137
github-token: ${{secrets.GITHUB_TOKEN}}
148138
script: |
149-
github.issues.createComment({
139+
github.rest.issues.createComment({
150140
issue_number: context.payload.number,
151141
owner: context.repo.owner,
152142
repo: context.repo.repo,

.github/workflows/production.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ jobs:
3131
runs-on: ubuntu-latest
3232
steps:
3333
- name: Checkout project
34-
uses: actions/checkout@v2
34+
uses: actions/checkout@v3
3535
- name: Use Node.js 16.xs
36-
uses: actions/setup-node@v2
36+
uses: actions/setup-node@v3
3737
with:
3838
node-version: '16.x'
3939
registry-url: 'https://registry.npmjs.org'
4040
- name: Restore cache
41-
uses: actions/cache@v2
41+
uses: actions/cache@v3
4242
with:
4343
path: '**/node_modules'
4444
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
@@ -52,14 +52,14 @@ jobs:
5252
- update-dependencies
5353
steps:
5454
- name: Checkout project
55-
uses: actions/checkout@v2
55+
uses: actions/checkout@v3
5656
- name: Use Node.js 16.xs
57-
uses: actions/setup-node@v2
57+
uses: actions/setup-node@v3
5858
with:
5959
node-version: '16.x'
6060
registry-url: 'https://registry.npmjs.org'
6161
- name: Restore cache
62-
uses: actions/cache@v2
62+
uses: actions/cache@v3
6363
with:
6464
path: '**/node_modules'
6565
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
@@ -79,7 +79,7 @@ jobs:
7979
name: Lint prose
8080
runs-on: ubuntu-latest
8181
steps:
82-
- uses: actions/checkout@v2
82+
- uses: actions/checkout@v3
8383
- uses: errata-ai/vale-action@reviewdog
8484
env:
8585
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
@@ -96,14 +96,14 @@ jobs:
9696
- lint
9797
steps:
9898
- name: Checkout project
99-
uses: actions/checkout@v2
99+
uses: actions/checkout@v3
100100
- name: Use Node.js 16.xs
101-
uses: actions/setup-node@v2
101+
uses: actions/setup-node@v3
102102
with:
103103
node-version: '16.x'
104104
registry-url: 'https://registry.npmjs.org'
105105
- name: Restore cache
106-
uses: actions/cache@v2
106+
uses: actions/cache@v3
107107
with:
108108
path: '**/node_modules'
109109
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}

.github/workflows/staging.yml

Lines changed: 40 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -26,44 +26,39 @@ env:
2626
GATSBY_NEWSLETTER_FORM_ID: 1420
2727

2828
jobs:
29-
update-dependencies:
30-
name: Update node module dependencies
31-
runs-on: ubuntu-latest
32-
steps:
33-
- name: Checkout project
34-
uses: actions/checkout@v2
35-
- name: Use Node.js 16.xs
36-
uses: actions/setup-node@v2
37-
with:
38-
node-version: '16.x'
39-
registry-url: 'https://registry.npmjs.org'
40-
- name: Restore cache
41-
uses: actions/cache@v2
42-
with:
43-
path: '**/node_modules'
44-
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
45-
- name: Install dependencies
46-
run: npm install
4729
lint:
4830
name: Lint code
4931
runs-on: ubuntu-latest
50-
needs:
51-
- update-dependencies
5232
steps:
5333
- name: Checkout project
54-
uses: actions/checkout@v2
34+
uses: actions/checkout@v3
5535
- name: Use Node.js 16.xs
56-
uses: actions/setup-node@v2
36+
uses: actions/setup-node@v3
5737
with:
5838
node-version: '16.x'
5939
registry-url: 'https://registry.npmjs.org'
60-
- name: Restore cache
61-
uses: actions/cache@v2
40+
cache: 'npm'
41+
- name: Restore node_modules cache
42+
uses: actions/cache@v3
6243
with:
6344
path: '**/node_modules'
6445
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
65-
- name: Install dependencies
46+
- name: Install
6647
run: npm install
48+
- name: Restore Gatsby cache
49+
uses: actions/cache@v3
50+
with:
51+
# Gatsby requires both .cache and public. It will refuse to use .cache/ if public/ is not present.
52+
path: |
53+
.cache
54+
public
55+
# Cache will not be used by Gatsby if the following files change:
56+
# https://www.gatsbyjs.com/docs/build-caching/
57+
# We use the commit SHA on the key to prevent an ever-living cache entry keyed as "main".
58+
key: pr-gatsby-${{ hashFiles('package.json', 'gatsby-config.js', 'gatsby-node.js') }}-${{ github.ref }}-${{ github.sha }}
59+
restore-keys: |
60+
pr-gatsby-${{ hashFiles('package.json', 'gatsby-config.js', 'gatsby-node.js') }}-${{ github.ref }}-
61+
pr-gatsby-${{ hashFiles('package.json', 'gatsby-config.js', 'gatsby-node.js') }}-
6762
- name: Check formatting
6863
run: |
6964
npm run format
@@ -77,7 +72,7 @@ jobs:
7772
name: Lint prose
7873
runs-on: ubuntu-latest
7974
steps:
80-
- uses: actions/checkout@v2
75+
- uses: actions/checkout@v3
8176
- uses: errata-ai/vale-action@reviewdog
8277
env:
8378
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
@@ -93,19 +88,32 @@ jobs:
9388
- lint
9489
steps:
9590
- name: Checkout project
96-
uses: actions/checkout@v2
91+
uses: actions/checkout@v3
9792
- name: Use Node.js 16.xs
98-
uses: actions/setup-node@v2
93+
uses: actions/setup-node@v3
9994
with:
10095
node-version: '16.x'
10196
registry-url: 'https://registry.npmjs.org'
102-
- name: Restore cache
103-
uses: actions/cache@v2
97+
cache: 'npm'
98+
- name: Restore node_modules cache
99+
uses: actions/cache@v3
104100
with:
105101
path: '**/node_modules'
106102
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
107-
- name: Install dependencies
103+
- name: Install
108104
run: npm install
105+
- name: Restore Gatsby cache
106+
uses: actions/cache@v3
107+
with:
108+
# Gatsby requires both .cache and public. It will refuse to use .cache/ if public/ is not present.
109+
path: |
110+
.cache
111+
public
112+
# Cache will not be used by Gatsby if the following files change:
113+
# https://www.gatsbyjs.com/docs/build-caching/
114+
key: pr-gatsby-${{ hashFiles('package.json', 'gatsby-config.js', 'gatsby-node.js') }}-${{ github.ref }}
115+
restore-keys: |
116+
pr-gatsby-${{ hashFiles('package.json', 'gatsby-config.js', 'gatsby-node.js') }}-
109117
- name: Build project
110118
run: npm run build:gatsby
111119
- name: Checks if AWS CLI already installed
@@ -124,9 +132,8 @@ jobs:
124132
name: "Checks broken links"
125133
runs-on: ubuntu-latest
126134
needs: [build-deploy-staging]
127-
continue-on-error: true
128135
steps:
129-
- uses: actions/checkout@v2
136+
- uses: actions/checkout@v3
130137
- uses: JustinBeckwith/linkinator-action@v1
131138
with:
132139
paths: ${{ env.GATSBY_DEFAULT_DOC_URL }}

0 commit comments

Comments
 (0)