This repository has been archived by the owner on May 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
78 lines (66 loc) · 2.19 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
language: node_js
node_js:
- "12"
services:
- docker
cache:
directories:
- /nix
before_install:
# Install Nix
- curl https://nixos.org/nix/install | sh
# Do linting, coverage, and build docs (to upload to Github pages)
script:
# Do an update to populate db prior to testing
- npx ts-node src/cli.ts update nixos-20.03
- npm run lint
- npm run cover
- npm run docs
- npm run build
- npm run bundle:$TRAVIS_OS_NAME
- make docker
# Dump the packages to a TSV file for browsing (until we have a better way of browsing them)
- npx ts-node src/cli.ts dump packages --tsv > docs/packages.tsv
# Generate Nix files
# node2nix produce a lot of output on stderr which causes Travis to say
# "The job exceeded the maximum log length, and has been terminated."
# There does not appear to be a node2nix option to turn this off.
# Travis will also kill a build if no output is received for 10 mins, so
# use `travis_wait` to ensure that does not happen.
#- (cd nix/pkgs/development/node-packages; travis_wait 60 ./generate.sh)
#- (cd nix/pkgs/development/python-modules; ./generate.sh)
#- (cd nix/pkgs/development/r-modules; ./generate.sh)
# Upload test coverage to codecov
# See https://docs.codecov.io/v5.0.0/docs/about-the-codecov-bash-uploader
after_success:
- bash <(curl -s https://codecov.io/bash)
# Prevent Github Pages from using Jekyll
# which causes docs files starting with underscores to be ignored
before_deploy:
- touch docs/.nojekyll
deploy:
# Deploy documentation to Github Pages
# See https://docs.travis-ci.com/user/deployment/pages/
- provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN
local-dir: docs
on:
branch: master
# Do a semantic release (only on Linux)
# Temporarily skipping until refactoring complete
#- provider: script
# skip_cleanup: true
# script: npx semantic-release
# on:
# branch: master
# condition: $TRAVIS_OS_NAME = linux
# Deploy build artifacts to Github release
# page on *any* tag (including those generated for a semantic release)
- provider: releases
api_key: $GITHUB_TOKEN
file_glob: true
file: bin/*.tar.gz
skip_cleanup: true
on:
tags: true