Travis CI - reichlab/covid19-forecast-hub GitHub Wiki
We automate a lot of this project with the help of Travis CI.
Getting started with Travis
- Make an account on travis-ci.com NOT travis-ci.org.
- Link the account to your GitHub Account
- Go to: https://travis-ci.com/github/reichlab/covid19-forecast-hub
How Travis CI works
Travis first looks at the .travis.yml file in the root directory and spins up a VM with Travis servers to perform a series of tasks that we determine.
.travis.yml
File
The mandatory Travis set up file which is run at every build automatically. In our case, we specify additional scripts to execute with script: ./travis-main.sh
.
- Configures the VM operating system, dependencies, and cached libraries
- Runs the main execution script:
script: ./travis-main.sh
travis-main.sh
A bash script that executes a series of scripts to:
- Validate the incoming data (
source ./travis/validate-data.sh
)- Runs at:
every build on master
- Runs at:
- Update the truth data (
bash ./travis/update-truth.sh
)- Runs at:
cron job @ 6:30am
- Runs at:
- Upload forecasts to zoltar (
bash ./travis/upload-to-zoltar.sh
)- Runs at:
every merged pull request
- Runs at:
- Update already validated files (
cp ./code/validation/locally_validated_files.csv ./code/validation/validated_files.csv
)- Runs at:
every build except PRs
- Runs at:
- Test uploading forecasts to zoltar manually
- Runs at:
any commit with "test zoltar upload" in the message
- Runs at:
- Test uploading truth to zoltar manually
- Runs at:
any commit with "test truth" in the message
- Runs at:
All scripts run on Travis can be found in ./travis/