diff options
Diffstat (limited to 'support/doc/development')
-rw-r--r-- | support/doc/development/ci.md | 40 | ||||
-rw-r--r-- | support/doc/development/lib.md | 17 | ||||
-rw-r--r-- | support/doc/development/release.md | 1 | ||||
-rw-r--r-- | support/doc/development/tests.md | 10 |
4 files changed, 59 insertions, 9 deletions
diff --git a/support/doc/development/ci.md b/support/doc/development/ci.md new file mode 100644 index 000000000..7d6eef197 --- /dev/null +++ b/support/doc/development/ci.md | |||
@@ -0,0 +1,40 @@ | |||
1 | # Continuous integration | ||
2 | |||
3 | PeerTube uses Github Actions as a CI platform. | ||
4 | CI tasks are described in `.github/workflows`. | ||
5 | |||
6 | ## benchmark.yml | ||
7 | |||
8 | *Scheduled* | ||
9 | |||
10 | Run various benchmarks (build, API etc) and upload results on https://builds.joinpeertube.org/peertube-stats/ to be publicly consumed. | ||
11 | |||
12 | ## codeql.yml | ||
13 | |||
14 | *Scheduled, on push on develop and on pull request* | ||
15 | |||
16 | Run CodeQL task to throw code security issues in Github. https://lgtm.com/projects/g/Chocobozzz/PeerTube can also be used. | ||
17 | |||
18 | ## docker.yml | ||
19 | |||
20 | *Scheduled and on push on master* | ||
21 | |||
22 | Build `chocobozzz/peertube-webserver:latest`, `chocobozzz/peertube:production-...`, `chocobozzz/peertube:v-...` (only latest PeerTube tag) and `chocobozzz/peertube:develop-...` Docker images. Scheduled to automatically upgrade image software (Debian security issues etc). | ||
23 | |||
24 | ## nightly.yml | ||
25 | |||
26 | *Scheduled* | ||
27 | |||
28 | Build PeerTube nightly build (`develop` branch) and upload the release on https://builds.joinpeertube.org/nightly. | ||
29 | |||
30 | ## stats.yml | ||
31 | |||
32 | *On push on develop* | ||
33 | |||
34 | Create various PeerTube stats (line of codes, build size, lighthouse report) and upload results on https://builds.joinpeertube.org/peertube-stats/ to be publicly consumed. | ||
35 | |||
36 | ## test.yml | ||
37 | |||
38 | *Scheduled, on push and pull request* | ||
39 | |||
40 | Run PeerTube lint and tests. | ||
diff --git a/support/doc/development/lib.md b/support/doc/development/lib.md index 6b0372150..c43edbacc 100644 --- a/support/doc/development/lib.md +++ b/support/doc/development/lib.md | |||
@@ -2,9 +2,24 @@ | |||
2 | 2 | ||
3 | ## @peertube/embed-api | 3 | ## @peertube/embed-api |
4 | 4 | ||
5 | ### Build | 5 | ### Build & Publish |
6 | 6 | ||
7 | ``` | 7 | ``` |
8 | $ cd client/src/standalone/player/ | 8 | $ cd client/src/standalone/player/ |
9 | $ npm run build | 9 | $ npm run build |
10 | $ npm publish --access=public | ||
10 | ``` | 11 | ``` |
12 | |||
13 | ## @peertube/peertube-types | ||
14 | |||
15 | Typescript definition files generation is controlled by the various `tsconfig.types.json` files. | ||
16 | |||
17 | The complete types package is generated via: | ||
18 | |||
19 | ``` | ||
20 | $ npm run generate-types-package 4.x.x | ||
21 | $ cd packages/types/dist | ||
22 | $ npm publish --access=public | ||
23 | ``` | ||
24 | |||
25 | > See [scripts/generate-types-package.ts](scripts/generate-types-package.ts) for details. | ||
diff --git a/support/doc/development/release.md b/support/doc/development/release.md index a9a3ca452..d62969cf2 100644 --- a/support/doc/development/release.md +++ b/support/doc/development/release.md | |||
@@ -15,6 +15,7 @@ NODE_APP_INSTANCE=6 NODE_ENV=test node dist/server --benchmark-startup | |||
15 | * Check CI tests are green | 15 | * Check CI tests are green |
16 | * Run BrowserStack **and** local E2E tests | 16 | * Run BrowserStack **and** local E2E tests |
17 | * Release: `GITHUB_TOKEN=my_token npm run release -- 1.x.x` | 17 | * Release: `GITHUB_TOKEN=my_token npm run release -- 1.x.x` |
18 | * Upload `tar.xz` on https://builds.joinpeertube.org/release | ||
18 | * Create a dedicated branch: `git checkout -b release/1.x.x && git push origin release/1.x.x` | 19 | * Create a dedicated branch: `git checkout -b release/1.x.x && git push origin release/1.x.x` |
19 | * Check the release is okay: https://github.com/Chocobozzz/PeerTube/releases | 20 | * Check the release is okay: https://github.com/Chocobozzz/PeerTube/releases |
20 | * Update https://peertube3.cpy.re and check it works correctly | 21 | * Update https://peertube3.cpy.re and check it works correctly |
diff --git a/support/doc/development/tests.md b/support/doc/development/tests.md index d0e88a5eb..02fc41147 100644 --- a/support/doc/development/tests.md +++ b/support/doc/development/tests.md | |||
@@ -42,7 +42,7 @@ $ npm run test # See scripts/test.sh to run a particular suite | |||
42 | Most of tests can be runned using: | 42 | Most of tests can be runned using: |
43 | 43 | ||
44 | ```bash | 44 | ```bash |
45 | TS_NODE_TRANSPILE_ONLY=true mocha -- --timeout 30000 --exit -r ts-node/register -r tsconfig-paths/register --bail server/tests/api/videos/video-transcoder.ts | 45 | TS_NODE_TRANSPILE_ONLY=true npm run mocha -- --timeout 30000 --exit -r ts-node/register -r tsconfig-paths/register --bail server/tests/api/videos/video-transcoder.ts |
46 | ``` | 46 | ``` |
47 | 47 | ||
48 | `server/tests/api/activitypub` tests will need different options: | 48 | `server/tests/api/activitypub` tests will need different options: |
@@ -88,13 +88,7 @@ $ BROWSERSTACK_USER=your_user BROWSERSTACK_KEY=your_key npm run e2e:browserstack | |||
88 | 88 | ||
89 | ### Add E2E tests | 89 | ### Add E2E tests |
90 | 90 | ||
91 | To add E2E tests and quickly run tests using a local Chrome, first create a test instance: | 91 | To add E2E tests and quickly run tests using a local Chrome: |
92 | |||
93 | ```bash | ||
94 | $ npm run clean:server:test && NODE_APP_INSTANCE=1 NODE_ENV=test npm start | ||
95 | ``` | ||
96 | |||
97 | Then, just run your suite using: | ||
98 | 92 | ||
99 | ```bash | 93 | ```bash |
100 | $ cd client/e2e | 94 | $ cd client/e2e |