首页 > 解决方案 > sqlite3.OperationalError: no such table: dag when running in tox environment

问题描述

我有一个运行 tox 文件的 github 操作。tox 文件正在对 apache 气流进行一些非常基本的测试。例如:
workflow.yml

- uses: actions/checkout@v1
- some more steps
- name: Run tox
      run: tox

毒物

[tox]
envlist = py36
[testenv]
deps =
    pytest
commands =
    pytest

测试文件.py

def test_dags():
    dagbag = DagBag(dag_folder=str(os.path.dirname(os.path.abspath('task_manager_airflow'))) / 'dags', include_examples=False)
    dag = dagbag.get_dag(dag_id='some_dag')

no such table: daggithub操作运行时怎么会出错?当我在我的机器上本地运行它时,它运行良好。

标签: airflowgithub-actionstox

解决方案


推荐阅读