Skip to content
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Officially supported CI servers:
| Name | Constant | isPR |
| ------------------------------------------------------------------------------- | ----------------------- | ---- |
| [Agola CI](https://agola.io/) | `ci.AGOLA` | ✅ |
| [Alpic](https://alpic.ai/) | `ci.ALPIC` | 🚫 |
| [Appcircle](https://appcircle.io/) | `ci.APPCIRCLE` | ✅ |
| [AppVeyor](http://www.appveyor.com) | `ci.APPVEYOR` | ✅ |
| [AWS CodeBuild](https://aws.amazon.com/codebuild/) | `ci.CODEBUILD` | ✅ |
Expand Down
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const id: string | null;

/* Vendor constants */
export const AGOLA: boolean;
export const ALPIC: boolean;
export const APPCIRCLE: boolean;
export const APPVEYOR: boolean;
export const CODEBUILD: boolean;
Expand Down
18 changes: 18 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,24 @@ test('Anonymous CI', function (t) {
t.end()
})

test('Alpic', function (t) {
process.env.ALPIC_HOST = 'true'

clearModule('./')
const ci = require('./')

t.equal(ci.isCI, true)
t.equal(ci.isPR, null)
t.equal(ci.name, 'Alpic')
t.equal(ci.ALPIC, true)
t.equal(ci.id, 'ALPIC')
assertVendorConstants('ALPIC', ci, t)

delete process.env.ALPIC_HOST

t.end()
})

test('AppVeyor - PR', function (t) {
process.env.APPVEYOR = 'true'
process.env.APPVEYOR_PULL_REQUEST_NUMBER = '42'
Expand Down
5 changes: 5 additions & 0 deletions vendors.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"env": "AGOLA_GIT_REF",
"pr": "AGOLA_PULL_REQUEST_ID"
},
{
"name": "Alpic",
"constant": "ALPIC",
"env": "ALPIC_HOST"
},
{
"name": "Appcircle",
"constant": "APPCIRCLE",
Expand Down