diff --git a/.github/workflows/dockerBuild.yml b/.github/workflows/dockerBuild.yml new file mode 100644 index 00000000..c2cff663 --- /dev/null +++ b/.github/workflows/dockerBuild.yml @@ -0,0 +1,35 @@ +name: DockerBuild + +on: + pull_request: + branches: + - master + types: + - closed +env: + APP_VERSION: 1.0.0 + +jobs: + Build-App: + runs-on: ubuntu-latest + steps: + - name: Recuperation du repo + uses: actions/checkout@v3 + - name: Installation de QEMU + uses: docker/setup-qemu-action@v1 + - name: Installation docker BuildX + uses: docker/setup-buildx-action@v1 + - name: Login & password docker + uses: docker/login-action@v1 + with: + username: ${{secrets.USERNAME_DOCKER}} + password: ${{secrets.PASSWORD_DOCKER}} + - name: build & push + uses: docker/build-push-action@v2 + with: + context: . + push: true + tags: ${{secrets.USERNAME_DOCKER}}/pyapp:${{env.APP_VERSION}} + + + diff --git a/.github/workflows/pythonInstall.yml b/.github/workflows/pythonInstall.yml new file mode 100644 index 00000000..4456a5ec --- /dev/null +++ b/.github/workflows/pythonInstall.yml @@ -0,0 +1,27 @@ +name: AppTest + +on: + push: + branches: + - dev + +env: + APP_VERSION: 1.0.0 + +jobs: + Python: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax + architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified + - run: pip install -r requirements.txt + - run: pytest > report.txt + - name: Recuperation du rapport + uses: actions/upload-artifact@v3 + with: + name: mon-report + path: ./report.txt + \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..012a09c2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM python:latest +WORKDIR /app +COPY . . +RUN pip install -r requirements.txt +CMD [ "python", "conftest"] \ No newline at end of file diff --git a/app.js b/app.js new file mode 100644 index 00000000..e69de29b diff --git a/requirements.txt b/requirements.txt index 7938abe0..0b7a25b1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,6 @@ pluggy==0.13.1; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2 py==1.10.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' pytest-mock==1.10.3 pytest-watch==4.2.0 -pytest==4.4.0 +pytest==6.2.5 six==1.15.0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2' watchdog==2.0.2; python_version >= '3.6'