The Astro CLI is a command-line interface for data orchestration. It allows you to get started with Apache Airflow quickly and it can be used with all Astronomer products.
-
Install
Go1.19 or later. See Download and install Go. -
Clone and build:
cd $GOPATH/src/github.com/astronomer/astro-cli git clone git@github.com:astronomer/astro-cli.git cd astro-cli make build
-
Run the following command to install
pre-commitand run lint on every commit:brew install pre-commitpre-commit installRun lint locally:
pre-commit run --all-files -
Lint the
Gocode with the following command:make lint
To test Astro locally you'll need to update your global or local config to point to right platform type and local Astro endpoint. For example:
local:
platform: cloud
astro: http://localhost:8871/v1Similarly, to test software locally you'll need to update the platform type and local houston endpoint. For example:
local:
platform: software
houston: http://localhost:8871/v1Before you run tests, make sure you have running locally houston or Astro on http://localhost:8871/v1. This is a requirement for running some tests.
To run unit-tests run:
make testAstronomer uses mockery to generate mocks for Golang interfaces.
To regenerate an existing interface mocks, run make mock.
To generate mocks for a new interface, add it to .mockery.yml and rerun make mock.