Skip to content

Commit 5aff438

Browse files
authored
docs: update and try to clarify and expand README (#16)
1 parent 3f54a5a commit 5aff438

File tree

1 file changed

+31
-11
lines changed

1 file changed

+31
-11
lines changed

README.md

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,48 @@ on: [push, pull_request]
1515

1616
jobs:
1717
test:
18-
runs-on: ubuntu-18.04 # tested on: 18.04/20.04
18+
runs-on: ubuntu-22.04 # tested on: 20.04/22.04
1919
steps:
2020
- uses: actions/checkout@v1
21-
- uses: ddev/github-action-setup-ddev@v1
21+
- name: Setup DDEV
22+
uses: ddev/github-action-setup-ddev@v1
23+
2224
# example: composer install
2325
- run: ddev composer install
26+
2427
# example: fill database
2528
- run: ddev mysql < data/db.sql
26-
# ... and so on.
29+
30+
# ... and so on. For example:
31+
- run: ddev exec bin/myAcceptanceTests.sh
32+
- run: ddev exec make tests
33+
- run: ddev composer ci:tests
34+
- run: ddev composer ci:tests:acceptance:${{ matrix.browser }}
35+
- run: ddev yarn --frozen-lockfile --no-progress --non-interactive && ddev yarn mocha-tests
36+
- run: ddev npm ci && ddev npm run mocha-tests
37+
- run: test 'test for expected output' = "$(curl --silent https://my-ddev-project.ddev.site)"
38+
39+
# use different PHP version in a test matrix
40+
- run: |
41+
sed -i -e 's/^php_version:.*/php_version: ${{ matrix.php-version }}/g' .ddev/config.yaml \
42+
&& ddev start
2743
```
2844
2945
### Options
3046
3147
#### ddevDir
3248
33-
Path to your DDEV project.
49+
Path to your DDEV project. This path needs to contain the `.ddev/` directory.
3450

3551
default: `.` (root directory)
3652

3753
```yaml
38-
- uses: ddev/github-action-setup-ddev@v1
54+
- name: Setup DDEV
55+
uses: ddev/github-action-setup-ddev@v1
3956
with:
4057
ddevDir: ".devbox"
41-
# run `ddev` project commands from that directory
42-
- run: ddev composer install
58+
- name: 'You need to switch to that directory to use the `ddev` command'
59+
run: ddev composer install
4360
working-directory: .devbox
4461
```
4562
@@ -71,17 +88,20 @@ default: `latest`
7188

7289
### SSH keys
7390

74-
If your workflow needs to reach remote destinations that require private SSH keys, here is a snippet showing how you might add SSH keys that you have entered as GitHub "secrets":
91+
If your workflow needs to reach remote destinations that require private SSH keys,
92+
we recommend adding SSH keys that you have entered as [GitHub "secrets"](https://docs.github.com/en/actions/security-guides/encrypted-secrets):
7593

7694
```
77-
- name: Set up SSH keys
95+
- name: Setup SSH keys
7896
run: |
7997
mkdir -p .ddev/homeadditions/.ssh
8098
echo "${{ secrets.MY_KEY }}" > .ddev/homeadditions/.ssh/id_rsa
81-
echo "${{ secrets.MY_KNOWN_HOSTS }}" > .ddev/homeadditions/.ssh/known_hosts
8299
chmod 700 .ddev/homeadditions/.ssh
83100
chmod 600 .ddev/homeadditions/.ssh/id_rsa
84-
- name: Set up ddev
101+
- name 'optional: set up host keys'
102+
run: |
103+
echo "${{ secrets.MY_KNOWN_HOSTS }}" > .ddev/homeadditions/.ssh/known_hosts
104+
- name: Setup DDEV
85105
uses: ddev/github-action-setup-ddev@v1
86106
```
87107

0 commit comments

Comments
 (0)