run:
- download repo files
git clone [email protected]:achicha/airflow_example.git - go to airflow directory
cd airflow_example - add twitter
BEARER_TOKEN=to.env - start local airflow:
docker-compose up --build -d
- open airflow web
http://0.0.0.0:8080/withadmin/admincredentials - run tests:
docker ps # get container_id from dwh_scheduler docker exec -it container_id bash # go inside running container cd /opt/airflow # move to airflow directory export PYTHONPATH="$(pwd)" # add dags folder to variables cd /opt/airflow/tests # move to test directory pytest # run all tests pytest -k test_twitter_api_account_id # or run specific test
- exit:
docker-compose down # stop local airflow service