GithubHelp home page GithubHelp logo

Comments (4)

leorudczenko avatar leorudczenko commented on August 11, 2024

I believe I've managed to get the workflow to work with a postgres image, here is the latest test run:

https://github.com/BritishGeologicalSurvey/etlhelper/actions/runs/5965566004/job/16183282865

Many of the tests are hitting an ERROR because the environment variables are not set in the GitHub workflow:
etlhelper.exceptions.ETLHelperConnectionError: Password environment variable (TEST_PG_PASSWORD) is not set

I do not have permissions to modify these, @volcan01010 can you update these appropriately?

Moreover, since we are including sqlite3 tests, this error has come up again too:
etlhelper.exceptions.ETLHelperConnectionError: Could not import sqlite3 module required for SQLite connections. Check Python configuration - this should be part of Standard Library.

This stackoverflow post is the closest thing I have found to our sqlite3 problem, but it isn't what we need I don't think:
https://stackoverflow.com/questions/72165451/pytest-is-failing-on-github-actions-but-succeeds-locally

Some answers to this post may be more relevant:
https://stackoverflow.com/questions/19530974/how-can-i-add-the-sqlite3-module-to-python

from etlhelper.

volcan01010 avatar volcan01010 commented on August 11, 2024

For the SQLite issue, we may need to just skip the SQLite tests for now. The PostgreSQL ones cover more of the logic anyway.

For the PostgreSQL, we can hard-code the environment variables into the CI config YAML. It is only a disposable test database so we don't need to keep them secret. The values are:

env:
  POSTGRES_DB: etlhelper
  POSTGRES_USER: etlhelper_user
  POSTGRES_PASSWORD: etlhelper_pw
  POSTGRES_HOST: postgis

For the PostGIS container, we should specify this version: postgis/postgis:15-3.4

from etlhelper.

leorudczenko avatar leorudczenko commented on August 11, 2024

Well we've progressed from one issue to another! Now most of the tests are passing, but many are failing due to this:

etlhelper.exceptions.ETLHelperConnectionError: Error connecting to DbParams(host='localhost', port='5432', dbname='etlhelper', user='etlhelper_user', dbtype='PG') via dbapi: connection to server at "localhost" (::1), port 5432 failed: Connection refused
	Is the server running on that host and accepting TCP/IP connections?

You can see the workflow run here: https://github.com/BritishGeologicalSurvey/etlhelper/actions/runs/5977922960/job/16218951792

from etlhelper.

volcan01010 avatar volcan01010 commented on August 11, 2024

Closing this as has been merged into for_v1.

from etlhelper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.