From 941d6d3f5cbf790e06e5f06b1c83c32407e1965f Mon Sep 17 00:00:00 2001 From: Andrey Marakulin Date: Wed, 4 Oct 2023 17:19:37 +0300 Subject: [PATCH 1/2] Yaml fix --- .github/workflows/build_and_publish.yml | 2 +- .github/workflows/checks.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_and_publish.yml b/.github/workflows/build_and_publish.yml index 07d4389..082ca91 100644 --- a/.github/workflows/build_and_publish.yml +++ b/.github/workflows/build_and_publish.yml @@ -21,7 +21,7 @@ jobs: packages: write steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Log in to the Container registry uses: docker/login-action@v2 with: diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 8078dd8..2bb2846 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@v4 - name: Set up docker uses: docker-practice/actions-setup-docker@master - name: Run postgres @@ -50,7 +50,7 @@ jobs: linting: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions/setup-python@v2 with: python-version: 3.11 From 5cf969135bde778e826f8a5f86a56cccbe6c44cb Mon Sep 17 00:00:00 2001 From: Andrey Marakulin Date: Sat, 14 Oct 2023 15:26:45 +0300 Subject: [PATCH 2/2] Comment checks.yml --- .github/workflows/checks.yml | 132 +++++++++++++++++------------------ 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 2bb2846..b94b7dc 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -1,67 +1,67 @@ -name: Python package - -on: - pull_request: - -jobs: - test: - name: Unit tests - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Set up docker - uses: docker-practice/actions-setup-docker@master - - name: Run postgres - run: | - docker run -d -p 5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust --name db-test postgres:15-alpine - - uses: actions/setup-python@v4 - with: - python-version: '3.11' - - name: Install dependencies - run: | - python -m ensurepip - python -m pip install --upgrade --no-cache-dir pip - python -m pip install --upgrade --no-cache-dir -r requirements.txt -r requirements.dev.txt - - name: Migrate DB - run: | - DB_DSN=postgresql://postgres@localhost:5432/postgres alembic upgrade head - - name: Build coverage file - run: | - DB_DSN=postgresql://postgres@localhost:5432/postgres pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=achievement_api tests/ | tee pytest-coverage.txt - - name: Print report - if: always() - run: | - cat pytest-coverage.txt - - name: Pytest coverage comment - uses: MishaKav/pytest-coverage-comment@main - with: - pytest-coverage-path: ./pytest-coverage.txt - title: Coverage Report - badge-title: Code Coverage - hide-badge: false - hide-report: false - create-new-comment: false - hide-comment: false - report-only-changed-files: false - remove-link-from-badge: false - junitxml-path: ./pytest.xml - junitxml-title: Summary - linting: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v2 - with: - python-version: 3.11 - - uses: isort/isort-action@master - with: - requirementsFiles: "requirements.txt requirements.dev.txt" - - uses: psf/black@stable - - name: Comment if linting failed - if: ${{ failure() }} - uses: thollander/actions-comment-pull-request@v2 - with: - message: | - :poop: Code linting failed, use `black` and `isort` to fix it. +#name: Python package +# +#on: +# pull_request: +# +#jobs: +# test: +# name: Unit tests +# runs-on: ubuntu-latest +# steps: +# - name: Checkout +# uses: actions/checkout@v4 +# - name: Set up docker +# uses: docker-practice/actions-setup-docker@master +# - name: Run postgres +# run: | +# docker run -d -p 5432:5432 -e POSTGRES_HOST_AUTH_METHOD=trust --name db-test postgres:15-alpine +# - uses: actions/setup-python@v4 +# with: +# python-version: '3.11' +# - name: Install dependencies +# run: | +# python -m ensurepip +# python -m pip install --upgrade --no-cache-dir pip +# python -m pip install --upgrade --no-cache-dir -r requirements.txt -r requirements.dev.txt +# - name: Migrate DB +# run: | +# DB_DSN=postgresql://postgres@localhost:5432/postgres alembic upgrade head +# - name: Build coverage file +# run: | +# DB_DSN=postgresql://postgres@localhost:5432/postgres pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=achievement_api tests/ | tee pytest-coverage.txt +# - name: Print report +# if: always() +# run: | +# cat pytest-coverage.txt +# - name: Pytest coverage comment +# uses: MishaKav/pytest-coverage-comment@main +# with: +# pytest-coverage-path: ./pytest-coverage.txt +# title: Coverage Report +# badge-title: Code Coverage +# hide-badge: false +# hide-report: false +# create-new-comment: false +# hide-comment: false +# report-only-changed-files: false +# remove-link-from-badge: false +# junitxml-path: ./pytest.xml +# junitxml-title: Summary +# linting: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - uses: actions/setup-python@v2 +# with: +# python-version: 3.11 +# - uses: isort/isort-action@master +# with: +# requirementsFiles: "requirements.txt requirements.dev.txt" +# - uses: psf/black@stable +# - name: Comment if linting failed +# if: ${{ failure() }} +# uses: thollander/actions-comment-pull-request@v2 +# with: +# message: | +# :poop: Code linting failed, use `black` and `isort` to fix it.