Skip to content

Commit d395f28

Browse files
committed
ci: use Ruff GitHub Action for linting
1 parent a1543ef commit d395f28

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,25 @@ jobs:
4141
steps:
4242
- name: 'Checkout the repo'
4343
uses: 'actions/checkout@v4'
44+
4445
- name: 'Install UV'
4546
uses: 'astral-sh/setup-uv@v5'
4647
with:
4748
version: '0.5.26'
49+
4850
- name: 'Setup Python'
4951
uses: 'actions/setup-python@v5'
5052
with:
5153
python-version-file: './cow-trader/pyproject.toml'
54+
5255
- name: 'Install dependencies'
5356
run: 'uv sync --all-extras --dev'
54-
- name: 'Lint'
55-
run: |
56-
ruff check .
57-
ruff format --check .
57+
58+
- name: 'Lint with Ruff'
59+
uses: astral-sh/ruff-action@v3
60+
run: ruff check --fix
61+
run: ruff format
62+
5863
- name: 'Add lint summary'
5964
run: |
6065
echo "## Lint result" >> $GITHUB_STEP_SUMMARY
@@ -69,26 +74,33 @@ jobs:
6974
steps:
7075
- name: 'Checkout the repo'
7176
uses: 'actions/checkout@v4'
77+
7278
- name: 'Install UV'
7379
uses: 'astral-sh/setup-uv@v5'
7480
with:
7581
version: '0.5.26'
82+
7683
- name: 'Setup Python'
7784
uses: 'actions/setup-python@v5'
7885
with:
7986
python-version-file: './cow-trader/pyproject.toml'
87+
8088
- name: 'Install dependencies'
8189
run: 'uv sync --all-extras --dev'
90+
8291
- name: 'Install Ape'
8392
uses: 'ApeWorX/github-action@v3'
8493
with:
8594
python-version: '3.11'
8695
ape-version-pin: '0.8.25'
8796
ape-plugins-list: 'solidity==0.8.5 alchemy==0.8.7 etherscan==0.8.4 foundry==0.8.7'
97+
8898
- name: 'Install contract dependencies'
8999
run: 'ape pm install gh:Vectorized/solady --name solady --ref v0.1.3'
100+
90101
- name: 'Compile contracts'
91102
run: 'ape compile --force'
103+
92104
- name: 'Add build summary'
93105
run: |
94106
echo "## Build result" >> $GITHUB_STEP_SUMMARY
@@ -104,26 +116,33 @@ jobs:
104116
steps:
105117
- name: 'Checkout the repo'
106118
uses: 'actions/checkout@v4'
119+
107120
- name: 'Install UV'
108121
uses: 'astral-sh/setup-uv@v5'
109122
with:
110123
version: '0.5.26'
124+
111125
- name: 'Setup Python'
112126
uses: 'actions/setup-python@v5'
113127
with:
114128
python-version-file: './cow-trader/pyproject.toml'
129+
115130
- name: 'Install dependencies'
116131
run: 'uv sync --all-extras --dev'
132+
117133
- name: 'Install Ape'
118134
uses: 'ApeWorX/github-action@v3'
119135
with:
120136
python-version: '3.11'
121137
ape-version-pin: '0.8.25'
122138
ape-plugins-list: 'solidity==0.8.5 alchemy==0.8.7 etherscan==0.8.4 foundry==0.8.7'
139+
123140
- name: 'Install contract dependencies'
124141
run: 'ape pm install gh:Vectorized/solady --name solady --ref v0.1.3'
142+
125143
- name: 'Run tests'
126144
run: 'ape test -s'
145+
127146
- name: 'Add test summary'
128147
run: |
129148
echo "## Tests result" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)