Skip to content

Commit

Permalink
feat: ruff linting and codeberg syncing
Browse files Browse the repository at this point in the history
  • Loading branch information
r3tr0ananas committed Jul 15, 2024
1 parent 2ed6bb4 commit cce5725
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/codeberg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# taken from: https://github.com/Vendicated/Vencord/blob/main/.github/workflows/codeberg-mirror.yml

name: Sync to Codeberg
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
on:
push:
workflow_dispatch:
schedule:
- cron: "0 */6 * * *"

jobs:
codeberg:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pixta-dev/repository-mirroring-action@674e65a7d483ca28dafaacba0d07351bdcc8bd75 # v1.1.1
with:
target_repo_url: "[email protected]:${{github.repository}}.git"
ssh_private_key: ${{ secrets.CODEBERG_SSH_PRIVATE_KEY }}
28 changes: 28 additions & 0 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Ruff linting

on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]
- name: Lint with ruff
run: |
# stop the build if there are Python syntax errors or undefined names
ruff check --target-version=py38 .

0 comments on commit cce5725

Please sign in to comment.