Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define bionic as the OS, and refactor. #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Montana
Copy link

@Montana Montana commented Dec 9, 2022

Hello NIAID, I'd suggest you make this piece in your .travis.yml a bash script:

if [ $TRAVIS_PULL_REQUEST == false ] && [ $TRAVIS_BRANCH == "master" ];
     then
        echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > ~/.npmrc;
      else
        echo "//registry.npmjs.org/:_authToken=\${NPM_INSTALL_TOKEN}" > ~/.npmrc;
 fi

Name it whatever you want, for the sake of this example I'm going to name it pull_requests.sh, once you've done that, push to the repo and have your .travis.yml look a bit different, and cleaner. Like the following:

os: bionic
language: node_js
node_js:
  - lts/*
  - node
before_install:
  - chmod +x pull_requests.sh 
  - ./pull_requests.sh
  - 'git config --global url."git@github.com:".insteadOf "https://github.com/"'
  - npm i -g @labshare/lsc codecov
install:
  - npm install
  - npm run build
script:
  - npm run coverage
  - codecov
branches:
  except:
    - /^v\d+\.\d+\.\d+$/
jobs:
  allow_failures:
    - node_js: node
  include:
    - stage: release
      node_js: lts/*
      script:
        - npm run build
      deploy:
        provider: script
        skip_cleanup: true
        script: npm run semantic-release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant