Skip to content

Commit ef6e235

Browse files
committed
ci: add rustfmt, clippy job to rust.yml
1 parent 8198031 commit ef6e235

File tree

1 file changed

+13
-49
lines changed

1 file changed

+13
-49
lines changed

.github/workflows/rust.yml

Lines changed: 13 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ jobs:
2828
POSTGRES_DB: postgres
2929
ports:
3030
- 5432:5432
31-
# redis:
32-
# image: redis:7
33-
# ports:
34-
# - 6379:6379
3531
steps:
3632
- uses: actions/checkout@v4
3733
- uses: dtolnay/rust-toolchain@stable
@@ -49,53 +45,21 @@ jobs:
4945
run: |
5046
sudo apt-get install libpq-dev -y
5147
./ci/init_db.sh
52-
# - name: Check sqlx-data.json is up-to-date
48+
# - name: Check .sqlx is up-to-date
5349
# run: |
5450
# cargo sqlx prepare --workspace --check
5551
- name: Test
5652
run: cargo test
5753

58-
# fmt:
59-
# name: Rustfmt
60-
# runs-on: ubuntu-latest
61-
# steps:
62-
# - uses: actions/checkout@v3
63-
# - uses: dtolnay/rust-toolchain@stable
64-
# with:
65-
# components: rustfmt
66-
# - name: Check fmt
67-
# run: cargo fmt --check
68-
69-
# clippy:
70-
# name: Clippy
71-
# runs-on: ubuntu-latest
72-
# services:
73-
# postgres:
74-
# image: postgres:14
75-
# env:
76-
# POSTGRES_USER: postgres
77-
# POSTGRES_PASSWORD: password
78-
# POSTGRES_DB: postgres
79-
# ports:
80-
# - 5432:5432
81-
# steps:
82-
# - uses: actions/checkout@v3
83-
# - uses: dtolnay/rust-toolchain@stable
84-
# with:
85-
# components: clippy
86-
# - uses: Swatinem/rust-cache@v2
87-
# with:
88-
# key: sqlx-${{ env.SQLX_VERSION }}
89-
# - name: Install sqlx-cli
90-
# run:
91-
# cargo install sqlx-cli
92-
# --version=${{ env.SQLX_VERSION }}
93-
# --features ${{ env.SQLX_FEATURES }}
94-
# --no-default-features
95-
# --locked
96-
# - name: Migrate database
97-
# run: |
98-
# sudo apt-get install libpq-dev -y
99-
# SKIP_DOCKER=true ./scripts/init_db.sh
100-
# - name: Linting
101-
# run: cargo clippy -- -D warnings
54+
fmt-clippy:
55+
name: Check
56+
runs-on: ubuntu-latest
57+
steps:
58+
- uses: actions/checkout@v4
59+
- uses: dtolnay/rust-toolchain@stable
60+
with:
61+
components: rustfmt, clippy
62+
- name: Check fmt
63+
run: cargo fmt --check
64+
- name: Clippy
65+
run: cargo clippy -- -D warnings

0 commit comments

Comments
 (0)