<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Guillermo Alfonso Morales</title>
    <description>The latest articles on DEV Community by Guillermo Alfonso Morales (@gamorales).</description>
    <link>https://dev.to/gamorales</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F293975%2F78859449-cf69-4876-9919-901e541eddff.png</url>
      <title>DEV Community: Guillermo Alfonso Morales</title>
      <link>https://dev.to/gamorales</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gamorales"/>
    <language>en</language>
    <item>
      <title>Execute Django tests in your github actions</title>
      <dc:creator>Guillermo Alfonso Morales</dc:creator>
      <pubDate>Sun, 12 Jan 2020 15:31:25 +0000</pubDate>
      <link>https://dev.to/gamorales/execute-django-tests-in-your-github-actions-ckg</link>
      <guid>https://dev.to/gamorales/execute-django-tests-in-your-github-actions-ckg</guid>
      <description>&lt;p&gt;When you are trying github actions with your django project, and your database is for example, PostgreSQL, could be a problem running tests in the workflow (personal experience 😋).&lt;/p&gt;

&lt;p&gt;The problem is, you don't have an environment or DB engine running inside github actions platform, neither a server where github actions could run tests, then,  when is turn of "run tests" step, you'll have this error.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NObjPH5v--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/ebn90vzctslhe2869kbt.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NObjPH5v--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/ebn90vzctslhe2869kbt.jpg" alt="Running django tests with connection error"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, ¿what do we do?.&lt;/p&gt;

&lt;p&gt;Well, an easy way to fix this problem is check if your project is running in test mode to change your DB engine to SQLite inside settings.py, in this way, github actions could run all tests.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--U96NoMyB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/hieac53fy2757dahl3uo.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--U96NoMyB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/hieac53fy2757dahl3uo.jpg" alt="Running django tests Ok"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is my first post in dev.to, I hope could help somebody with the same problem I had.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gist.github.com/gamorales/31b41565764dbea4acbb888c1f3a3678"&gt;Github actions workflow&lt;/a&gt;&lt;/p&gt;

</description>
      <category>django</category>
      <category>testing</category>
      <category>github</category>
      <category>actions</category>
    </item>
  </channel>
</rss>
