From 62ad1d516b80c202aeb04992d3325e0f635b70b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Ga=C5=82ek?= Date: Thu, 25 Jan 2024 01:04:32 +0100 Subject: [PATCH] use pipenv in workflows --- .github/workflows/pylint.yaml | 6 +++++- .github/workflows/test.yaml | 5 ++++- Pipfile | 3 --- Pipfile.lock | 6 ++---- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pylint.yaml b/.github/workflows/pylint.yaml index 88c81c1..8d98917 100755 --- a/.github/workflows/pylint.yaml +++ b/.github/workflows/pylint.yaml @@ -6,7 +6,11 @@ jobs: steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 + with: + python-version: '3.12' + cache: pipenv + - run: python -m pip install --upgrade pipenv wheel - run: pipenv install --dev - uses: pr-annotators/pylint-pr-annotator@main - name: Analysing the code with pylint - run: pylint $(git ls-files '*.py') \ No newline at end of file + run: pipenv run pylint $(git ls-files '*.py') \ No newline at end of file diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 02b2084..1987576 100755 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -12,13 +12,16 @@ jobs: PYTHONUTF8: 1 permissions: pull-requests: write + contents: write steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} + cache: pipenv + - run: python -m pip install --upgrade pipenv wheel - run: pipenv install --dev - - run: coverage run -m unittest discover -s ./_tests + - run: pipenv run coverage run -m unittest discover -s ./_tests - uses: py-cov-action/python-coverage-comment-action@v3 with: GITHUB_TOKEN: ${{ github.token }} \ No newline at end of file diff --git a/Pipfile b/Pipfile index ccb26ff..f3b380c 100644 --- a/Pipfile +++ b/Pipfile @@ -8,6 +8,3 @@ name = "pypi" [dev-packages] coverage = "*" pylint = "*" - -[requires] -python_version = "3.12" diff --git a/Pipfile.lock b/Pipfile.lock index 9cd26a4..d7b9487 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,12 +1,10 @@ { "_meta": { "hash": { - "sha256": "9cd9ca131bfcf09152adf925368ffd28d5805db9ac18e75eb7a39b91e329330b" + "sha256": "59f90ce5c85559a1ebe95004e921b19a1a9bf13aa753f54acbe4d4009656ae50" }, "pipfile-spec": 6, - "requires": { - "python_version": "3.12" - }, + "requires": {}, "sources": [ { "name": "pypi",