Skip to content

Commit fb8bd85

Browse files
committed
feat: add Eartly CI
1 parent 8e6a591 commit fb8bd85

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Officially supported CI servers:
5050
| [Codeship](https://codeship.com) | `ci.CODESHIP` | 🚫 |
5151
| [Drone](https://drone.io) | `ci.DRONE` ||
5252
| [dsari](https://github.com/rfinnie/dsari) | `ci.DSARI` | 🚫 |
53+
| [Earthly CI](https://earthly.dev/) | `ci.EARTHLY` | 🚫 |
5354
| [Expo Application Services](https://expo.dev/eas) | `ci.EAS` | 🚫 |
5455
| [Gerrit CI](https://www.gerritcodereview.com) | `ci.GERRIT` | 🚫 |
5556
| [GitHub Actions](https://github.com/features/actions/) | `ci.GITHUB_ACTIONS` ||

index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export const CODEMAGIC: boolean;
4343
export const CODESHIP: boolean;
4444
export const DRONE: boolean;
4545
export const DSARI: boolean;
46+
export const EARTHLY: boolean;
4647
export const EAS: boolean;
4748
export const GERRIT: boolean;
4849
export const GITEA_ACTIONS: boolean;

test.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,23 @@ test('Prow', function (t) {
983983
t.equal(ci.PROW, true)
984984
assertVendorConstants('PROW', ci, t)
985985

986-
delete process.env.PROW
986+
delete process.env.PROW_JOB_ID
987+
988+
t.end()
989+
})
990+
991+
test('Earthly CI', function (t) {
992+
process.env.EARTHLY_CI = 'true'
993+
994+
clearModule('./')
995+
const ci = require('./')
996+
997+
t.equal(ci.isCI, true)
998+
t.equal(ci.name, 'Earthly')
999+
t.equal(ci.EARTHLY, true)
1000+
assertVendorConstants('EARTHLY', ci, t)
1001+
1002+
delete process.env.EARTHLY_CI
9871003

9881004
t.end()
9891005
})

vendors.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@
110110
"constant": "DSARI",
111111
"env": "DSARI"
112112
},
113+
{
114+
"name": "Earthly",
115+
"constant": "EARTHLY",
116+
"env": "EARTHLY_CI"
117+
},
113118
{
114119
"name": "Expo Application Services",
115120
"constant": "EAS",

0 commit comments

Comments
 (0)