travis-service.rkt (716B)
1 #lang racket/base 2 (provide travis-service@ travis-ci?) 3 4 (require "ci-service.rkt" racket/unit racket/list racket/string) 5 6 (define (travis-ci?) (and (getenv "CI") (getenv "TRAVIS"))) 7 8 (define-unit travis-service@ 9 (import) 10 (export ci-service^) 11 12 (define (query) 13 (define repo-slug (getenv "TRAVIS_REPO_SLUG")) 14 (list (cons 'service "travis") 15 (cons 'token (getenv "CODECOV_TOKEN")) 16 (cons 'branch (getenv "TRAVIS_BRANCH")) 17 (cons 'pull_request (getenv "TRAVIS_PULL_REQUEST")) 18 (cons 'job (getenv "TRAVIS_JOB_ID")) 19 (cons 'slug (getenv "TRAVIS_REPO_SLUG")) 20 (cons 'build (getenv "TRAVIS_JOB_NUMBER")) 21 (cons 'commit (getenv "TRAVIS_COMMIT")))))