diff options
| author | 2022-09-11 01:13:40 +0100 | |
|---|---|---|
| committer | 2022-09-11 01:13:40 +0100 | |
| commit | 4f4d877c5fd85b959d8c6c1909362a94ed8750c9 (patch) | |
| tree | 47b188a823f151ef64a4ef16bedcdf43edd325eb /.github | |
| parent | Merge pull request #18 from python-discord/bump-dep (diff) | |
| parent | Remove CI env vars (diff) | |
Merge pull request #24 from python-discord/poetry-1.2.0
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/lint-build-deploy.yaml | 50 |
1 files changed, 6 insertions, 44 deletions
diff --git a/.github/workflows/lint-build-deploy.yaml b/.github/workflows/lint-build-deploy.yaml index f28530f..e39a4ac 100644 --- a/.github/workflows/lint-build-deploy.yaml +++ b/.github/workflows/lint-build-deploy.yaml @@ -14,54 +14,16 @@ jobs: lint: name: Lint runs-on: ubuntu-latest - env: - # Configure pip to cache dependencies and do a user install - PIP_NO_CACHE_DIR: false - PIP_USER: 1 - - # Make sure package manager does not use virtualenv - POETRY_VIRTUALENVS_CREATE: false - - # Specify explicit paths for python dependencies and the pre-commit - # environment so we know which directories to cache - POETRY_CACHE_DIR: ${{ github.workspace }}/.cache/py-user-base - PYTHONUSERBASE: ${{ github.workspace }}/.cache/py-user-base - PRE_COMMIT_HOME: ${{ github.workspace }}/.cache/pre-commit-cache - steps: - - name: Add custom PYTHONUSERBASE to PATH - run: echo '${{ env.PYTHONUSERBASE }}/bin/' >> $GITHUB_PATH - - name: Checkout repository uses: actions/checkout@v2 - - name: Setup python - id: python - uses: actions/setup-python@v2 + - name: Install Python Dependencies + uses: HassanAbouelela/actions/setup-python@setup-python_v1.3.1 with: - python-version: '3.10' - - # This step caches our Python dependencies. To make sure we - # only restore a cache when the dependencies, the python version, - # the runner operating system, and the dependency location haven't - # changed, we create a cache key that is a composite of those states. - # - # Only when the context is exactly the same, we will restore the cache. - - name: Python Dependency Caching - uses: actions/cache@v2 - id: python_cache - with: - path: ${{ env.PYTHONUSERBASE }} - key: "python-0-${{ runner.os }}-${{ env.PYTHONUSERBASE }}-\ - ${{ steps.python.outputs.python-version }}-\ - ${{ hashFiles('./pyproject.toml', './poetry.lock') }}" - - # Install our dependencies if we did not restore a dependency cache - - name: Install dependencies using poetry - if: steps.python_cache.outputs.cache-hit != 'true' - run: | - pip install poetry - poetry install + # Set dev=true to install flake8 extensions, which are dev dependencies + dev: true + python_version: '3.10' # Run flake8 and have it format the linting errors in the format of # the GitHub Workflow command to register error annotations. This @@ -183,4 +145,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: pull-request-payload - path: pull_request_payload.json
\ No newline at end of file + path: pull_request_payload.json |