From 9412ec80e38a4875f95fd117b1d1100dfb7bbd81 Mon Sep 17 00:00:00 2001 From: ikaroskun Date: Fri, 1 Mar 2024 16:34:52 +0800 Subject: [PATCH] build(dependencies): :arrow_up: fix action --- .github/workflows/test.yaml | 17 +++++++++++------ pyproject.toml | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f7c716f..e09a41f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -14,26 +14,31 @@ jobs: python-version: ['3.6', '3.7', '3.8', '3.9', '3.10', "3.11"] include: - python-version: '3.10' - update-coverage: false + update-coverage: true steps: - uses: actions/checkout@v3 - - name: Install poetry - run: pipx install poetry - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - cache: 'poetry' + - name: Cache pip + uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ matrix.python-version }}-poetry-${{ hashFiles('pyproject.toml') }} - name: Install dependencies - run: poetry install + run: | + python -m pip install --upgrade pip poetry + poetry install - name: Test with pytest run: poetry run pytest - name: Upload coverage to Codecov if: ${{ matrix.update-coverage }} uses: codecov/codecov-action@v3 with: - file: ./coverage.xml + token: ${{ secrets.CODECOV_TOKEN }} + files: ./coverage.xml fail_ci_if_error: true verbose: true diff --git a/pyproject.toml b/pyproject.toml index 709dc02..a0e8b90 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ python = "^3.6.2" requests = "^2.24" dataclasses-json = "^0.5.7" -[tool.poetry.dev-dependencies] +[tool.poetry.group.dev.dependencies] pytest = "^6.2.5" [build-system]