macrdel commited on
Commit
b4e262e
1 Parent(s): 7ddeeda

update workflow

Browse files
Files changed (1) hide show
  1. .github/workflows/main.yml +13 -12
.github/workflows/main.yml CHANGED
@@ -22,28 +22,29 @@ jobs:
22
  password: ${{ secrets.DOCKER_PASSWORD }}
23
 
24
  - name: Build Docker image for app
25
- run: docker build -t macrdel/sentiment-summarize-youtube-comments-backend:latest .
26
-
27
- - name: Build Docker image for tests
28
- run: docker build -t macrdel/sentiment-summarize-youtube-comments-backend-tests:latest .
29
 
30
  test:
31
  runs-on: ubuntu-latest
32
  needs: build
33
-
 
 
 
 
 
 
 
34
  steps:
35
  - name: Checkout code
36
  uses: actions/checkout@v2
37
 
38
- - name: Login to Docker Hub
39
- uses: docker/login-action@v1
40
- with:
41
- username: ${{ secrets.DOCKER_USERNAME }}
42
- password: ${{ secrets.DOCKER_PASSWORD }}
43
-
44
  - name: Run tests
45
  run: |
46
- docker run --rm macrdel/sentiment-summarize-youtube-comments-backend-tests:latest pytest tests
47
 
48
  push:
49
  runs-on: ubuntu-latest
 
22
  password: ${{ secrets.DOCKER_PASSWORD }}
23
 
24
  - name: Build Docker image for app
25
+ run: docker build -t macrdel/app:latest .
 
 
 
26
 
27
  test:
28
  runs-on: ubuntu-latest
29
  needs: build
30
+ services:
31
+ docker:
32
+ image: docker:19.03.12
33
+ options: --privileged
34
+ ports:
35
+ - 8000:8000
36
+ - 9090:9090
37
+ - 3000:3000
38
  steps:
39
  - name: Checkout code
40
  uses: actions/checkout@v2
41
 
42
+ - name: Set up Docker Compose
43
+ run: |
44
+ docker-compose -f docker-compose.yml up -d
 
 
 
45
  - name: Run tests
46
  run: |
47
+ docker-compose -f docker-compose.yml run tests
48
 
49
  push:
50
  runs-on: ubuntu-latest