diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e6f72d9..5263fcd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,6 +25,8 @@ jobs: run: pip install -r requirements.txt - name: Run test script + env: + DUNE_API_KEY: ${{ secrets.DUNE_API_KEY }} run: python -u github_workflows/action.py - name: Print name diff --git a/github_workflows/action.py b/github_workflows/action.py index 6b9a7aa..cbfa8f8 100644 --- a/github_workflows/action.py +++ b/github_workflows/action.py @@ -1 +1,17 @@ -print('test action hello wrld') \ No newline at end of file +print('test action hello wrld') + +import yaml +from dune_client.client import DuneClient + +dune = DuneClient.from_env() + +# Read the queries.yml file +with open('queries.yml', 'r') as file: + data = yaml.safe_load(file) + +# Extract the query_ids from the data +query_ids = [id for id in data['query_ids']] + +for id in query_ids: + query = dune.get_query(id) + print(query) \ No newline at end of file diff --git a/queries.yml b/queries.yml index 06ffdd8..72ea62f 100644 --- a/queries.yml +++ b/queries.yml @@ -1,5 +1,8 @@ query_ids: - - query_id_1 - - query_id_2 - - query_id_3 + - 3237721 + - 3237738 + - 3237745 + - 3237723 + - 3237726 + - 3237742 \ No newline at end of file