aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github/workflows
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-07-30 08:46:11 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-07-31 11:32:04 +0200
commitb9fe9a7ffdf80d81c5580ccccfeb989051fd9d8a (patch)
treeaa6d28143af938141886635deaeb714ebb5dbe9a /.github/workflows
parent837fe4f3fbdb7f07bdc7a0a643cd58802a16add9 (diff)
downloadPeerTube-b9fe9a7ffdf80d81c5580ccccfeb989051fd9d8a.tar.gz
PeerTube-b9fe9a7ffdf80d81c5580ccccfeb989051fd9d8a.tar.zst
PeerTube-b9fe9a7ffdf80d81c5580ccccfeb989051fd9d8a.zip
Add github workflows
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/test.yml73
1 files changed, 73 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 000000000..feb885378
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,73 @@
1name: Test Suite
2
3on: [push, pull_request]
4
5jobs:
6
7 test:
8 runs-on: ubuntu-latest
9
10 services:
11 redis:
12 image: redis
13 ports:
14 - 6379:6379
15
16 postgres:
17 image: postgres:9.6
18 ports:
19 - 5432:5432
20 env:
21 POSTGRES_USER: peertube
22 POSTGRES_HOST_AUTH_METHOD: trust
23
24 strategy:
25 fail-fast: true
26 matrix:
27 test_suite: [ misc, api-1, api-2, api-3, api-4, cli, lint ]
28
29 env:
30 PGUSER: peertube
31 PGHOST: localhost
32
33 steps:
34 - uses: actions/checkout@v2
35
36 - name: Use Node.js
37 uses: actions/setup-node@v1
38 with:
39 node-version: '12.x'
40
41 - name: Setup system dependencies
42 run: |
43 sudo apt-get install postgresql-client-common redis-tools
44 wget --quiet --no-check-certificate "https://download.cpy.re/ffmpeg/ffmpeg-release-4.0.3-64bit-static.tar.xz"
45 tar xf ffmpeg-release-4.0.3-64bit-static.tar.xz
46 mkdir -p $HOME/bin
47 cp ffmpeg-*/{ffmpeg,ffprobe} $HOME/bin
48 echo "::add-path::$HOME/bin"
49
50 - name: Cache Node.js modules
51 uses: actions/cache@v2
52 with:
53 path: ~/.cache/yarn
54 key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }}
55 restore-keys: |
56 ${{ runner.OS }}-node-
57 ${{ runner.OS }}-
58
59 - name: Install dependencies
60 run: yarn install --frozen-lockfile
61
62 - name: Test
63 run: echo $PATH
64
65 - name: Run Test
66 run: NODE_PENDING_JOB_WAIT=2000 npm run ci -- ${{ matrix.test_suite }}
67
68 - name: Upload logs
69 uses: actions/upload-artifact@v2
70 if: failure()
71 with:
72 name: test-storages
73 path: test*/logs