-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ruff linting and codeberg syncing
- Loading branch information
1 parent
2ed6bb4
commit cce5725
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 . |