Integrating in CI
#
Travis CIAdd to your Travis settings a secret named
GREENFRAME_SECRET_TOKEN
with your API token.Add a
.travis.yml
containing:
git: depth: false # Fetch all the git historybefore_install: - sudo apt-get update - curl https://assets.greenframe.io/install.sh | bashscript: # Start your application here - greenframe analyze
If you want to activate the automatic comparison with your base branch, GreenFrame CLI needs to be able to get the commit ID ancestor. Travis disables the git history by default in order to speed up your build time. You have to overwrite the git clone depth:
git: depth: false # Fetch all the git history
#
Github ActionsAdd to your repo settings a secret named
GREENFRAME_SECRET_TOKEN
with your API token.Add a
.github/workflows/greenframe.yml
containing:
name: Greenframe Analysison: [push]jobs: greenframeci: runs-on: ubuntu-latest steps: - uses: actions/[email protected] with: fetch-depth: 0 # Fetch all the git history - run: curl https://assets.greenframe.io/install.sh | bash # Start your application here - run: greenframe analyze env: GREENFRAME_SECRET_TOKEN: ${{secrets.GREENFRAME_SECRET_TOKEN}}
If you want to activate the automatic comparison with your base branch, GreenFrame CLI needs to be able to get the commit ID ancestor. Gthub actions disables the git history by default in order to speed up your build time.
You have to overwrite the fetch-depth parameter inside the checkout github actions
:
- uses: actions/[email protected] with: fetch-depth: 0 # Fetch all the git history