Skip to content

Commit 2879180

Browse files
committed
fixing >> linting
1 parent bc966b5 commit 2879180

2 files changed

Lines changed: 42 additions & 14 deletions

File tree

.github/workflows/fmt.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Reformat code
3+
4+
on:
5+
push:
6+
branches-ignore:
7+
- main
8+
- master
9+
10+
jobs:
11+
proxy:
12+
steps:
13+
- uses: actions/checkout@v6
14+
- name: Set up ruff
15+
run: curl -LsSf https://astral.sh/ruff/0.15.5/install.sh | sh
16+
- name: Reformat and push
17+
shell: bash
18+
run: |-
19+
ruff check --fix
20+
ruff format
21+
git config user.name "Automated"
22+
git config user.email "actions@users.noreply.github.com"
23+
timestamp=$(date -u)
24+
git commit -am "ruff: ${timestamp}" || exit 0
25+
git push
26+
echo "COMMITTED=1" >> "$GITHUB_ENV"
27+
- name: "Trigger build"
28+
run: |-
29+
if [ -z "$COMMITTED" ]; then
30+
echo "No commit"
31+
exit 0
32+
fi
33+
curl -L \
34+
-X POST \
35+
-H "Accept: application/vnd.github+json" \
36+
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
37+
-H "X-GitHub-Api-Version: 2022-11-28" \
38+
https://api.github.com/repos/exoscale/python-exoscale/actions/workflows/main.yml/dispatches \
39+
-d '{"ref": "'${{ github.ref }}'"}'

.github/workflows/main.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name: CI
33

44
"on":
5+
workflow_dispatch:
56
push:
67
branches:
78
- '**'
@@ -21,26 +22,14 @@ jobs:
2122
matrix:
2223
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
2324
steps:
24-
- uses: actions/checkout@v4
25-
- uses: astral-sh/setup-uv@v3
25+
- uses: actions/checkout@v6
26+
- uses: astral-sh/setup-uv@v7
2627
with:
2728
enable-cache: true
28-
cache-dependency-glob: "pyproject.toml"
2929
- name: Tests
3030
run: |
3131
uv --version
3232
uv run --python ${{ matrix.python-version }} pytest
3333
env:
3434
EXOSCALE_API_KEY: ${{ secrets.EXOSCALE_API_KEY }}
3535
EXOSCALE_API_SECRET: ${{ secrets.EXOSCALE_API_SECRET }}
36-
lint:
37-
name: Linting
38-
runs-on: ubuntu-latest
39-
steps:
40-
- uses: actions/checkout@v4
41-
- name: Set up ruff
42-
run: curl -LsSf https://astral.sh/ruff/0.6.9/install.sh | sh
43-
- name: Lint
44-
shell: bash
45-
run: |-
46-
ruff check

0 commit comments

Comments
 (0)