Skip to content

api test added to actions workflow #39

api test added to actions workflow

api test added to actions workflow #39

Workflow file for this run

name: Publish Docker image to DockerHub
on:
push:
branches:
- develop
jobs:
perform_pytest:
runs-on: ubuntu-latest
strategy:
python-version: ["3.10"]

Check failure on line 12 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / Publish Docker image to DockerHub

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 12, Col: 9): Unexpected value 'python-version'
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with pytest
run: |
pytest ./tests/api_test/
push_app_to_registry:
name: Push APP Docker image to Docker Hub
needs: perform_pytest
runs-on: ubuntu-latest
steps:
- name: 1 Copy repository
uses: actions/checkout@v2
- name: 2 Docker login
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
- name: 3 Build APP IMAGE
run: docker build -t app -f ./src/app/backend/dockerfile_api .
- name: 4 Tag
run: |
docker tag app ${{ secrets.DOCKER_USER }}/app:${{ github.sha }}
docker tag app ${{ secrets.DOCKER_USER }}/app:latest
- name: 5 SPush
run: |
docker push ${{ secrets.DOCKER_USER }}/app:${{ github.sha }}
docker push ${{ secrets.DOCKER_USER }}/app:latest
push_web_to_registry:
name: Push WEB Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: 1 Copy repository
uses: actions/checkout@v2
- name: 2 Docker login
run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PASSWORD }}
- name: 3 Build APP IMAGE
run: docker build -t web -f ./src/app/frontend/dockerfile_web .
- name: 4 Tag
run: |
docker tag web ${{ secrets.DOCKER_USER }}/web:${{ github.sha }}
docker tag web ${{ secrets.DOCKER_USER }}/web:latest
- name: 5 SPush
run: |
docker push ${{ secrets.DOCKER_USER }}/web:${{ github.sha }}
docker push ${{ secrets.DOCKER_USER }}/web:latest