diff options
| author | 2023-06-04 20:34:14 +0100 | |
|---|---|---|
| committer | 2023-06-04 20:34:14 +0100 | |
| commit | 1a362c04eb4d5d8f3c531a590d73cf5d7300ace8 (patch) | |
| tree | accbe4d840b036dcc9502eed395f19400f5ad9a3 /.github | |
| parent | Merge pull request #175 from python-discord/log-when-waiting-for-guild-to-be-... (diff) | |
| parent | Add changelog entry for ruff migration (diff) | |
Merge pull request #176 from python-discord/ruff-migration
Ruff migration
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/docs.yaml | 16 | ||||
| -rw-r--r-- | .github/workflows/lint-test.yaml | 24 |
2 files changed, 13 insertions, 27 deletions
diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 03e6bc96..bf0202a6 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -11,12 +11,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install Python Dependencies - uses: HassanAbouelela/actions/setup-python@setup-python_v1.3.2 + uses: HassanAbouelela/actions/setup-python@setup-python_v1.4.0 with: - dev: true python_version: "3.11" install_args: "--extras async-rediscache --only main --only doc" @@ -24,7 +23,7 @@ jobs: run: sphinx-build -nW -j auto -b html docs docs/build - name: Upload Build Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: docs-latest path: docs/build/* @@ -34,14 +33,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 # We need to check out the entire repository to find all tags - name: Install Python Dependencies - uses: HassanAbouelela/actions/setup-python@setup-python_v1.3.2 + uses: HassanAbouelela/actions/setup-python@setup-python_v1.4.0 with: - dev: true python_version: "3.11" install_args: "--extras async-rediscache" @@ -57,13 +55,13 @@ jobs: rm -r docs/build/**/.doctrees - name: Upload Build Artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: docs path: docs/build/* - name: Deploy To GitHub Pages - uses: JamesIves/[email protected] + uses: JamesIves/github-pages-deploy-action@v4 with: branch: docs folder: docs/build diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index 5d8c1aff..0182d268 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -13,29 +13,17 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Python Dependencies - uses: HassanAbouelela/actions/setup-python@setup-python_v1.3.2 + uses: HassanAbouelela/actions/setup-python@setup-python_v1.4.0 with: - # Set dev=true to run pre-commit which is a dev dependency - dev: true python_version: ${{ matrix.python_version }} install_args: "--extras async-rediscache --only main --only lint --only test" - # We will not run `flake8` here, as we will use a separate flake8 - # action. - name: Run pre-commit hooks - run: SKIP=flake8 pre-commit run --all-files + run: SKIP=ruff pre-commit run --all-files - # Run flake8 and have it format the linting errors in the format of - # the GitHub Workflow command to register error annotations. This - # means that our flake8 output is automatically added as an error - # annotation to both the run result and in the "Files" tab of a - # pull request. - # - # Format used: - # ::error file={filename},line={line},col={col}::{message} - - name: Run flake8 - run: "flake8 \ - --format='::error file=%(path)s,line=%(row)d,col=%(col)d::[flake8] %(code)s: %(text)s'" + # Run `ruff` using github formatting to enable automatic inline annotations. + - name: Run ruff + run: "ruff check --format=github ." - name: Run tests and generate coverage report run: python -m pytest -n auto --cov pydis_core -q @@ -60,7 +48,7 @@ jobs: - name: Upload a Build Artifact if: always() && steps.prepare-artifact.outcome == 'success' continue-on-error: true - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: pull-request-payload path: pull_request_payload.json |