-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
32 lines (26 loc) · 1.26 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
sudo: required
language: bash
install:
- sudo apt-get update -qy
- sudo apt-get install -y jq
- wget https://github.com/tus/tusd/releases/download/v1.0.0/tusd_linux_amd64.tar.gz
- tar xzf tusd_linux_amd64.tar.gz
before_script:
- chmod +x ./tusc.sh && bash -n ./tusc.sh
- chmod +x ./tusd_linux_amd64/tusd
- touch ~/.tus.dbg
script:
# lint
- 'export COMMITS=$(git log -50 --oneline --pretty="%s" --no-merges --grep "skip" --grep "Revert" --invert-grep ${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH} --)'
- 'export FILTERED=$(echo -e "$COMMITS" | grep -E "^(build|docs|chore|feat|fix|infra|perf|rebase|refactor|release|revert|style|test)(\(\w+\))?: [a-z].+")'
- 'echo -e "$COMMITS" > .commits && echo -e "$FILTERED" > .filtered'
- 'diff .commits .filtered'
# upload
- './tusd_linux_amd64/tusd --upload-dir ~/.tusd-data --base-path /tus/ > /dev/null 2>&1 &'
- 'DEBUG=1 ./tusc.sh -H 0:1080 -f tusd_linux_amd64.tar.gz -a sha256 -b /tus/ -- -v'
# download and verify
- rm -rf ~/.tus.dbg
- cat ~/.tus.json | jq
- 'URL=$(./tusc.sh -H 0:1080 -f tusd_linux_amd64.tar.gz -a sha256 -b /tus/ -L -C -S | cut -c 6-999)'
- 'wget $URL -O tusd_linux_amd64.tar.gz1'
- '[[ "$(md5sum tusd_linux_amd64.tar.gz1)" == "$(md5sum tusd_linux_amd64.tar.gz)1" ]] || exit 1'