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
Go
1.19 or later. See Download and install Go. -
Clone and build:
cd $GOPATH/src/github.com/astronomer/astro-cli git clone [email protected]:astronomer/astro-cli.git cd astro-cli make build
-
Run the following command to install
pre-commit
and run lint on every commit:brew install pre-commit
pre-commit install
Run lint locally:
pre-commit run --all-files
-
Lint the
Go
code 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/v1
Similarly, 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/v1
Before 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 test
Astronomer 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
.