Skip to content

Commit b1038d0

Browse files
authored
docs: harmonize examples 'use: ./' syntax explanation (#1534)
* docs: harmonize examples 'use: ./' syntax explanation * add name to cypress test in node workflow * change 'above line' to 'line'
1 parent 76e4513 commit b1038d0

29 files changed

+83
-34
lines changed

.github/workflows/example-basic-pnpm.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@ jobs:
3232
cache-dependency-path: examples/basic-pnpm/pnpm-lock.yaml
3333

3434
- name: Cypress tests
35-
# if you copy this workflow to another repository
36-
# take the next line as replacement for ./
37-
# uses: cypress-io/github-action@v6
38-
uses: ./
35+
uses: ./ # if copying, replace with cypress-io/github-action@v6
3936
with:
4037
working-directory: examples/basic-pnpm
4138
# print information about detected browsers, etc

.github/workflows/example-basic.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ jobs:
1919
uses: actions/checkout@v4
2020

2121
- name: Cypress tests
22-
# normally you would write
23-
# uses: cypress-io/github-action@v6
24-
uses: ./
22+
uses: ./ # if copying, replace with cypress-io/github-action@v6
2523
# the parameters below are only necessary
2624
# because we are running these examples in a monorepo
2725
with:

.github/workflows/example-build-artifacts.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ name: example-build-artifacts
66
# The test jobs use the results from the build job:
77
# - dependencies and the Cypress binary are installed using dependency caching
88
# - build results are restored using actions/download-artifact
9+
#
10+
# In the example jobs, the action is called with
11+
# uses: ./
12+
# which runs the action code from the current branch.
13+
# If you copy this workflow to another repo, replace the line with
14+
# uses: cypress-io/github-action@v6
915
on:
1016
push:
1117
branches:
@@ -21,7 +27,7 @@ jobs:
2127
uses: actions/checkout@v4
2228

2329
- name: Build app
24-
uses: ./ # refers to local instance of cypress-io/github-action@v6
30+
uses: ./
2531
with:
2632
runTests: false # only build app, don't test yet
2733
build: npm run build

.github/workflows/example-chrome-for-testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
with:
1919
chrome-version: 137
2020
- name: Cypress info
21-
uses: ./
21+
uses: ./ # if copying, replace with cypress-io/github-action@v6
2222
with:
2323
# just for full picture after installing Cypress
2424
# print information about detected browsers, etc

.github/workflows/example-chrome.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
name: example-chrome
2+
# In the example jobs, the action is called with
3+
# uses: ./
4+
# which runs the action code from the current branch.
5+
# If you copy this workflow to another repo, replace the line with
6+
# uses: cypress-io/github-action@v6
27
on:
38
push:
49
branches:

.github/workflows/example-component-test.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v4
1515
- name: Cypress run
16-
# normally you would write
17-
# uses: cypress-io/github-action@v6
18-
uses: ./
16+
uses: ./ # if copying, replace with cypress-io/github-action@v6
1917
with:
2018
working-directory: examples/component-tests
2119
component: true

.github/workflows/example-config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
name: example-config
2+
# In the example jobs, the action is called with
3+
# uses: ./
4+
# which runs the action code from the current branch.
5+
# If you copy this workflow to another repo, replace the line with
6+
# uses: cypress-io/github-action@v6
27
on:
38
push:
49
branches:

.github/workflows/example-cron.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ jobs:
1313
uses: actions/checkout@v4
1414

1515
- name: Cypress nightly tests 🌃
16-
uses: ./
16+
uses: ./ # if copying, replace with cypress-io/github-action@v6
1717
with:
1818
working-directory: examples/basic

.github/workflows/example-custom-ci-build-id.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ name: example-custom-ci-build-id
1414
# is generated _again_ on workflow re-run. This example
1515
# shows how to create a unique ID then pass it to
1616
# multiple testing jobs running in parallel.
17-
17+
#
18+
# In the example jobs, the action is called with
19+
# uses: ./
20+
# which runs the action code from the current branch.
21+
# If you copy this workflow to another repo, replace the line with
22+
# uses: cypress-io/github-action@v6
1823
on:
1924
push:
2025
branches:

.github/workflows/example-custom-command.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: actions/checkout@v4
2020

2121
- name: Custom tests
22-
uses: ./
22+
uses: ./ # if copying, replace with cypress-io/github-action@v6
2323
with:
2424
command: npm run custom-test
2525
working-directory: examples/custom-command

0 commit comments

Comments
 (0)