Skip to content

Commit

Permalink
chore: Make ~CircleCI~ Github Actions great again
Browse files Browse the repository at this point in the history
  • Loading branch information
Almad committed Sep 13, 2021
1 parent a716f90 commit 68980cb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Build docker images
run: docker-compose -f docker-compose.circle.yml build --pull && docker-compose -f docker-compose.circle.yml up --no-start
run: docker-compose -f docker-compose.server_ci.yml build --pull && docker-compose -f docker-compose.server_ci.yml up --no-start
- name: Start MySQL
run: docker-compose -f docker-compose.circle.yml start db
run: docker-compose -f docker-compose.server_ci.yml start db
- name: Wait for MySQL to create initial database
run: sleep 5
- name: run tests
run: docker-compose -f docker-compose.circle.yml run --rm web python3 manage.py test
run: docker-compose -f docker-compose.server_ci.yml run --rm web python3 manage.py test
lint:
runs-on: ubuntu-latest
steps:
Expand Down
6 changes: 3 additions & 3 deletions docker-compose.circle.yml → docker-compose.server_ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: '3'

# This docker-compose is same as docker-compose.yml except it's not using
# This docker-compose is same as docker-compose.yml except it's not using
# volumes since they are not allowed under "docker" CircleCI environment
# See https://circleci.com/docs/2.0/executor-types/
# See https://circleci.com/docs/2.0/executor-types/

services:
db:
Expand All @@ -12,7 +12,7 @@ services:
- MYSQL_DATABASE=ddcz
web:
environment:
- CIRCLECI=true
- SERVER_CI=true
build: .
command: python3 manage.py runserver 0.0.0.0:8000
expose:
Expand Down
6 changes: 3 additions & 3 deletions graveyard/settings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

from .base import *

if os.environ.get("CIRCLECI", False) == "true":
print("CircleCI environment detected, importing circle settings...")
from .circle import *
if os.environ.get("SERVER_CI", False) == "true":
print("Server CI environment detected, importing circle settings...")
from .ci_server import *


runtime = os.environ.get("ENVIRONMENT", "local")
Expand Down
File renamed without changes.

0 comments on commit 68980cb

Please sign in to comment.