Skip to content

Commit

Permalink
adding evergreen to repo (#900)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianf-mongodb authored Mar 31, 2022
1 parent 8f1636a commit 2d76620
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .evergreen/evergreen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Evergreen Project Config

# When a task that used to pass starts to fail
# Go through all versions that may have been skipped to detect
# when the task started failing
stepback: true

# Mark a failure as a system/bootstrap failure (purple box) rather then a task
# failure by default.
# Actual testing tasks are marked with `type: test`
command_type: system

# Protect ourself against rogue test case, or curl gone wild, that runs forever
# 12 minutes is the longest we'll ever run
exec_timeout_secs: 3600 # 12 minutes is the longest we'll ever run

# What to do when evergreen hits the timeout (`post:` tasks are run automatically)
timeout:
- command: shell.exec
params:
script: |
ls -la
functions:
"fetch source":
- command: git.get_project
params:
directory: docs-ecosystem


"install checker tool":
- command: shell.exec
type: system
params:
shell: bash
working_dir: docs-ecosystem
script: |
export GOPATH=$(dirname $(dirname $(dirname `pwd`)))
export GOROOT='/opt/golang/go1.16'
export PATH=$GOROOT/bin:$GOPATH/bin/:$PATH
go install github.com/terakilobyte/checker@latest
"run checker":
- command: shell.exec
type: test
params:
shell: bash
working_dir: docs-ecosystem
script: |
export GOPATH=$(dirname $(dirname $(dirname `pwd`)))
export GOROOT='/opt/golang/go1.16'
export PATH=$GOROOT/bin:$GOPATH/bin/:$PATH
git diff --name-only HEAD master | tr "\n" "," | xargs checker --path . --changes
pre:
- func: "fetch source"
- func: "install checker tool"

tasks:

- name: check
commands:
- func: "run checker"

buildvariants:

- name: ubuntu2004
display_name: Ubuntu 20.04
run_on: [ ubuntu2004-large ]
tasks:
- name: check

0 comments on commit 2d76620

Please sign in to comment.