diff --git a/.github/workflows/pull_request_closed.yml b/.github/workflows/pull_request_closed.yml new file mode 100644 index 00000000..cae8b96f --- /dev/null +++ b/.github/workflows/pull_request_closed.yml @@ -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" \ No newline at end of file diff --git a/.github/workflows/test_unitaire.yml b/.github/workflows/test_unitaire.yml new file mode 100644 index 00000000..3dfb5a73 --- /dev/null +++ b/.github/workflows/test_unitaire.yml @@ -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 }} \ No newline at end of file diff --git a/dockerfile b/dockerfile new file mode 100644 index 00000000..ec719ab6 --- /dev/null +++ b/dockerfile @@ -0,0 +1,9 @@ +FROM python:latest + +WORKDIR /app + +COPY . . + +RUN pip install -r requirements.txt + +CMD ["npm", "run", "start"] \ No newline at end of file