Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #14

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
13 changes: 13 additions & 0 deletions .github/workflows/pull_request_closed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: pull_request

on:
pull_request:
types: [closed]
jobs:
request_info:
runs-on: ubuntu-latest
steps:
- name: récupération pull_request
uses: action/checkout@v3
- name: pull reponse
run: echo "Je fait des test et ensuite le build"
44 changes: 44 additions & 0 deletions .github/workflows/test_unitaire.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: test automatique
on: push
jobs:
testsapp:
runs-on: ubuntu-latest
steps:
- name: Récupération du répository
uses: actions/checkout@v3
- name: installation de python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Info sur la version testé
run: echo ${{ matrix.python-version }}
- name: Install des dépendances
run: pip install -r requirements.txt
- name: Execution du code coverage
run: pytest
- name: Récupération du rapport
uses: actions/upload-artifact@v3
with:
name: reports
path: ./reports/**
Buildapp:
needs: Testsapp
runs-on: ubuntu-latest
steps:
- name: Récupération du répo
uses: actions/checkout@v3
- name: Installation de QEMU
uses: docker/setup-qemu-action@v1
- name: Installation de Docker BuildX
uses: docker/setup-buildx-action@v1
- name: Login au docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build & push docker
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/imagination:${{ env.APP_VERSION }}
9 changes: 9 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM python:latest

WORKDIR /app

COPY . .

RUN pip install -r requirements.txt

CMD ["npm", "run", "start"]