Skip to content

Commit

Permalink
feat: add Eartly CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sibiraj-s committed Oct 29, 2023
1 parent 8e6a591 commit fb8bd85
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Officially supported CI servers:
| [Codeship](https://codeship.com) | `ci.CODESHIP` | 🚫 |
| [Drone](https://drone.io) | `ci.DRONE` ||
| [dsari](https://github.com/rfinnie/dsari) | `ci.DSARI` | 🚫 |
| [Earthly CI](https://earthly.dev/) | `ci.EARTHLY` | 🚫 |
| [Expo Application Services](https://expo.dev/eas) | `ci.EAS` | 🚫 |
| [Gerrit CI](https://www.gerritcodereview.com) | `ci.GERRIT` | 🚫 |
| [GitHub Actions](https://github.com/features/actions/) | `ci.GITHUB_ACTIONS` ||
Expand Down
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const CODEMAGIC: boolean;
export const CODESHIP: boolean;
export const DRONE: boolean;
export const DSARI: boolean;
export const EARTHLY: boolean;
export const EAS: boolean;
export const GERRIT: boolean;
export const GITEA_ACTIONS: boolean;
Expand Down
18 changes: 17 additions & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,23 @@ test('Prow', function (t) {
t.equal(ci.PROW, true)
assertVendorConstants('PROW', ci, t)

delete process.env.PROW
delete process.env.PROW_JOB_ID

t.end()
})

test('Earthly CI', function (t) {
process.env.EARTHLY_CI = 'true'

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

t.equal(ci.isCI, true)
t.equal(ci.name, 'Earthly')
t.equal(ci.EARTHLY, true)
assertVendorConstants('EARTHLY', ci, t)

delete process.env.EARTHLY_CI

t.end()
})
Expand Down
5 changes: 5 additions & 0 deletions vendors.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@
"constant": "DSARI",
"env": "DSARI"
},
{
"name": "Earthly",
"constant": "EARTHLY",
"env": "EARTHLY_CI"
},
{
"name": "Expo Application Services",
"constant": "EAS",
Expand Down

0 comments on commit fb8bd85

Please sign in to comment.