Skip to content

CI Integration

Integrate Automated Future with your CI/CD pipeline.

CI Integration

Learn how to integrate Automated Future with popular CI/CD platforms.

GitHub Actions

Add Automated Future to your GitHub Actions workflow:

name: Tests
on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: '18'
      - run: npm install
      - run: npm install -g @automatedfuture/cli
      - name: Run tests with AF
        env:
          AF_API_KEY: ${{ secrets.AF_API_KEY }}
        run: af run -- npm test

GitLab CI

Add to your .gitlab-ci.yml:

test:
  script:
    - npm install -g @automatedfuture/cli
    - af run -- npm test
  variables:
    AF_API_KEY: $AF_API_KEY

Jenkins

Add to your Jenkinsfile:

pipeline {
  agent any
  environment {
    AF_API_KEY = credentials('af-api-key')
  }
  stages {
    stage('Test') {
      steps {
        sh 'npm install -g @automatedfuture/cli'
        sh 'af run -- npm test'
      }
    }
  }
}

Environment Variables

Required environment variables:

  • AF_API_KEY - Your Automated Future API key
  • AF_PROJECT_ID (optional) - Project ID if not set in config

Next Steps