1919# https://docs.travis-ci.com/user/reference/overview/#Virtualisation-Environment-vs-Operating-System
2020# https://blog.travis-ci.com/2017-08-31-trusty-as-default-status
2121
22- # [DEPRECATED ] “sudo” key:
22+ # [DECLINED ] “sudo” key:
2323# https://blog.travis-ci.com/2018-11-19-required-linux-infrastructure-migration
2424# [NOTE] Needs for correct APT addon usage:
2525# https://docs.travis-ci.com/user/reference/overview/
@@ -46,11 +46,13 @@ os: linux
4646# https://docs.travis-ci.com/user/reference/linux#overview
4747dist : focal
4848
49+
4950# [INFO] Don't download all repository history, that save a time:
5051# https://docs.travis-ci.com/user/customizing-the-build/#git-clone-depth
5152git :
5253 depth : 1
5354
55+
5456# Environment:
5557# [INFO] Using secure variables for Travis CI:
5658# https://docs.travis-ci.com/user/environment-variables/#defining-encrypted-variables-in-travisyml
105107 lmIISg0P2VtPLZIw4sCSJ9ts3dnOtADkYDiruXF1laoKmw4+73TpbNsvxNTYitSnWFsAOKoZqzCX3+t5v+swkb7gc7i+pXKDwuLaF6pF1lemV/
106108 3bpq7yay5d6KmMIPpDwW+rBNLhCbzxPLpGdG40xd9Gs+w6iRoRXIlChh6PuGohDAPcA/oMofXtHic3hx5ViAPDcxsoB5pjc8CM=
107109
110+
108111# Needs “language: bash” for multilanguage projects:
109112# https://github.com/travis-ci/travis-ci/issues/4895
110113# https://github.com/travis-ci/docs-travis-ci-com/issues/910
115118# https://github.com/travis-ci/travis-ci/issues/9180
116119language : python
117120
121+
118122# [DEPRECATED]
119123# # [NOTE] Python 3.7.3 or higher required, Python 3.7.2 have a bug:
120124# # ModuleNotFoundError: No module named '_contextvars'
@@ -123,18 +127,6 @@ language: python
123127# https://travis-ci.community/t/add-python-3-8-support/5463/4
124128python : 3.8
125129
126- # [DEPRECATED] Doesn't work on Travis CI, needs “matrix.include”:
127- # https://github.com/travis-ci/travis-ci/issues/9634
128- # # Multiple scripts
129- # # https://docs.travis-ci.com/user/speeding-up-the-build/#Parallelizing-your-builds-across-virtual-machines
130- # env:
131- # # “grunt default” = “grunt”;
132- # # Travis CI support blank value.
133- # - GRUNT_COMMAND=
134- # # If http-server run in background, “pipenv run pelican content -s publishconf.py”
135- # # command can't move “theme” folder.
136- # # I can't find method for http-server stop
137- # - GRUNT_COMMAND=default && grunt http-server screenshots && grunt publish
138130
139131# [INFO] “matrix.include”:
140132# https://docs.travis-ci.com/user/customizing-the-build#build-matrix
@@ -157,6 +149,7 @@ jobs:
157149 # https://github.com/calebzulawski/cotila/blob/master/.travis.yml
158150 - MATRIX_DEPLOY=1
159151
152+
160153# Sections:
161154# https://docs.travis-ci.com/user/job-lifecycle
162155# https://stackoverflow.com/a/34384262/5951529
@@ -196,6 +189,7 @@ addons:
196189# Cache doesn't save between “images” — new builds: new virtual machine for each build:
197190# https://docs.travis-ci.com/user/caching/#Things-not-to-cache
198191
192+
199193before_install :
200194# Virtual environment inside project directory:
201195# https://jcutrer.com/howto/dev/python/pipenv-pipfile
@@ -236,12 +230,42 @@ before_install:
236230# https://stackoverflow.com/a/34549249/5951529
237231- git config --global core.quotePath false
238232
233+
239234install :
235+ # [NOTE] Node.js latest version required;
236+ # because by default it doesn’t work correctly:
237+ # https://travis-ci.org/github/Kristinita/KristinitaPelican/jobs/728121010
238+ # [LEARN][NVM] Install the latest Node.js version by NVM:
239+ # https://github.com/nvm-sh/nvm#usage
240+ # https://travis-ci.org/github/Kristinita/SashaTravisDebugging/builds/728253580#L187-L188
241+ # [INFO] David Welsh reccomends NVM installation:
242+ # https://davidwalsh.name/nvm
243+ # [NOTE] “nvm install node” must be in “.travis.yml” file, not in external files;
244+ # otherwise you get error “nvm: command not found”:
245+ # https://travis-ci.org/github/Kristinita/SashaTravisDebugging/builds/728278371#L182
246+ # https://travis-ci.org/github/Kristinita/KristinitaPelican/jobs/728274971#L238
247+ # https://github.com/travis-ci/travis-ci/issues/6027
248+ # https://github.com/travis-ci/travis-ci/issues/5999
249+ # [NOTE] Doesn’t work:
250+ # “node_js: node”:
251+ # https://docs.travis-ci.com/user/languages/javascript-with-nodejs/#specifying-nodejs-versions
252+ # https://travis-ci.org/github/Kristinita/SashaTravisDebugging/builds/728248259#L182-L183
253+ # Node.js from apt addon:
254+ # https://travis-ci.org/github/Kristinita/SashaTravisDebugging/builds/728250645#L223-L224
255+ # “.nvmrc”:
256+ # https://docs.travis-ci.com/user/languages/javascript-with-nodejs/#specifying-nodejs-versions-using-nvmrc
257+ # https://travis-ci.org/github/Kristinita/SashaTravisDebugging/builds/728252349#L182-L183
258+ # “apt-get -y install node.js”:
259+ # https://stackoverflow.com/a/21119945/5951529
260+ # https://travis-ci.org/github/Kristinita/SashaTravisDebugging/builds/728252818#L219-220
261+ - nvm install node
262+
240263# [NOTE] Parallelshell works, but no time economy, diff:
241264# https://travis-ci.org/Kristinita/SashaPelicanTest/jobs/347254717
242265# https://travis-ci.org/Kristinita/SashaPelicanTest/jobs/347267767
243266- bash bash/travis-install.sh
244267
268+
245269# [INFO] Automatically deploy site to GitHub Pages:
246270# https://docs.travis-ci.com/user/deployment
247271# https://docs.travis-ci.com/user/deployment/pages/
0 commit comments