Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Commit 06a5302

Browse files
authored
docs: update js-ipfs ci instructions (#48)
js-ipfs has switched to gh actions so update the section about adding new examples to reflect that.
1 parent 1fa4185 commit 06a5302

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

README.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
- [Contributing](#contributing)
3434
- [Guidelines](#guidelines)
3535
- [Steps to follow after adding a new example](#steps-to-follow-after-adding-a-new-example)
36+
- [Create a repo](#create-a-repo)
37+
- [Update `js-ipfs` to run tests against the repo](#update-js-ipfs-to-run-tests-against-the-repo)
3638
- [Want to hack on IPFS?](#want-to-hack-on-ipfs)
3739

3840
## About The Project
@@ -137,15 +139,7 @@ Contributions are what make the open source community such an amazing place to b
137139

138140
### Steps to follow after adding a new example
139141

140-
- Update `js-ipfs` CI to run the test script of the example
141-
- Edit the `.travis.yml`, search for the test examples section and add the following:
142-
143-
```yml
144-
- stage: test
145-
name: examples - {TODO_EXAMPLE NAME}
146-
script:
147-
- npm run test:external -- -- -- https://github.com/ipfs-examples/{TODO_GIT_URL}.git
148-
```
142+
#### Create a repo
149143

150144
- Create a new repository based on (https://github.com/ipfs-examples/example-fork-go-template) following the name: `js-ipfs-{EXAMPLE_NAME}` with a description
151145

@@ -163,6 +157,22 @@ Contributions are what make the open source community such an amazing place to b
163157

164158
- Follow the instruction inside the README
165159

160+
#### Update `js-ipfs` to run tests against the repo
161+
162+
Open a PR to the [ipfs/js-ipfs](https://github.com/ipfs/js-ipfs) project that edits the `.github/workflows/test.yml` in order to make sure a js-ipfs release does not break your new example.
163+
164+
Search `.github/workflows/test.yml` for the `test-examples` section and add a block at the end of the `example` matrix key similar to:
165+
166+
```yml
167+
- name: my super fun new example
168+
repo: https://github.com/ipfs-examples/js-ipfs-my-super-fun-new-example.git
169+
deps: ipfs-core@$PWD/packages/ipfs-core/dist,ipfs-http-client@$PWD/packages/ipfs-http-client/dist
170+
```
171+
172+
The value of the `deps` key will vary depending on which modules from js-ipfs your example uses. Above we override the `ipfs-core` and `ipfs-http-client` modules, but your example may different deps.
173+
174+
Please see the existing setup in `.github/workflows/test.yml` for how to ensure you are overriding the correct modules.
175+
166176
## Want to hack on IPFS?
167177

168178
[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md)

0 commit comments

Comments
 (0)