pip install corrected #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Docker image to DockerHub | |
on: | |
push: | |
branches: | |
- develop | |
jobs: | |
perform_pytest: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
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 cat requirements.txt | xargs -n 1 pip install; fi #pip install -r requirements.txt; fi | |
- name: Lint with Ruff | |
run: | | |
pip install ruff | |
ruff --format=github --target-version=py310 . | |
continue-on-error: true | |
- name: Test with pytest | |
run: | | |
coverage run -m pytest ./tests/api_test/ -v -s | |
- name: Generate Coverage Report | |
run: | | |
coverage report -m | |
push_app_to_registry: | |
name: Push APP 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 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 |