Skip to content

Commit f329ff5

Browse files
feat: add alpic support (#143)
1 parent 384291f commit f329ff5

File tree

4 files changed

+25
-0
lines changed

4 files changed

+25
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Officially supported CI servers:
3535
| Name | Constant | isPR |
3636
| ------------------------------------------------------------------------------- | ----------------------- | ---- |
3737
| [Agola CI](https://agola.io/) | `ci.AGOLA` ||
38+
| [Alpic](https://alpic.ai/) | `ci.ALPIC` | 🚫 |
3839
| [Appcircle](https://appcircle.io/) | `ci.APPCIRCLE` ||
3940
| [AppVeyor](http://www.appveyor.com) | `ci.APPVEYOR` ||
4041
| [AWS CodeBuild](https://aws.amazon.com/codebuild/) | `ci.CODEBUILD` ||

index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export const id: string | null;
3333

3434
/* Vendor constants */
3535
export const AGOLA: boolean;
36+
export const ALPIC: boolean;
3637
export const APPCIRCLE: boolean;
3738
export const APPVEYOR: boolean;
3839
export const CODEBUILD: boolean;

test.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,24 @@ test('Anonymous CI', function (t) {
9999
t.end()
100100
})
101101

102+
test('Alpic', function (t) {
103+
process.env.ALPIC_HOST = 'true'
104+
105+
clearModule('./')
106+
const ci = require('./')
107+
108+
t.equal(ci.isCI, true)
109+
t.equal(ci.isPR, null)
110+
t.equal(ci.name, 'Alpic')
111+
t.equal(ci.ALPIC, true)
112+
t.equal(ci.id, 'ALPIC')
113+
assertVendorConstants('ALPIC', ci, t)
114+
115+
delete process.env.ALPIC_HOST
116+
117+
t.end()
118+
})
119+
102120
test('AppVeyor - PR', function (t) {
103121
process.env.APPVEYOR = 'true'
104122
process.env.APPVEYOR_PULL_REQUEST_NUMBER = '42'

vendors.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
"env": "AGOLA_GIT_REF",
66
"pr": "AGOLA_PULL_REQUEST_ID"
77
},
8+
{
9+
"name": "Alpic",
10+
"constant": "ALPIC",
11+
"env": "ALPIC_HOST"
12+
},
813
{
914
"name": "Appcircle",
1015
"constant": "APPCIRCLE",

0 commit comments

Comments
 (0)