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

Add CI #12

Merged
merged 4 commits into from
Jul 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: node_js

node_js:
- "14"
- "12"
- "10"

cache:
npm: false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the default, fwiw, so this line isn't needed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@ljharb ljharb Jul 6, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apparently i'm wrong as of a year ago :-) "Please note that as of July 2019, npm is cached by default on Travis CI" my mistake.

4 changes: 2 additions & 2 deletions test/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const CONFIG = require('./fixtures/config')
tap.test('package.json can be fetched with a valid url', async tap => {
tap.equal(JSON.stringify(await github.getPackageJson(CONFIG.DEP_ORG, CONFIG.DEP_REPO)), JSON.stringify(CONFIG.PKGJSON))
// tap.throws( await pkgTest.getPackageJson('not-an-org', 'not-a-repo'))
})
}, { skip: !process.env.GITHUB_TOKEN })

tap.test('correct permissions returned for GitHub repo', async tap => {
tap.equal((await github.getPermissions(CONFIG.DEP_ORG, CONFIG.DEP_REPO)), CONFIG.DEP_REPO_PERM)
})
}, { skip: !process.env.GITHUB_TOKEN })