Skip to content

Commit

Permalink
CI improvements and cleanup (#111)
Browse files Browse the repository at this point in the history
* ci: check sqlx prepare up to date

Signed-off-by: Alexis Asseman <[email protected]>

* chore: move release.yml to appropriate dir

Signed-off-by: Alexis Asseman <[email protected]>

* ci: removing gen-binaries

Looks incorrect. We can reintroduce something similar later.

Signed-off-by: Alexis Asseman <[email protected]>

---------

Signed-off-by: Alexis Asseman <[email protected]>
  • Loading branch information
aasseman authored Jan 15, 2024
1 parent 505fbb1 commit 123acf8
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 66 deletions.
File renamed without changes.
61 changes: 0 additions & 61 deletions .github/workflows/gen-binaries.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/license_headers_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
-l "apache" \
-s=only \
-ignore '.github/workflows/*.yml' \
-ignore '.github/*.yml' \
-ignore '.github/workflows/*.yaml' \
-ignore '.github/*.yaml' \
-ignore 'migrations/*.sql' \
.
.
30 changes: 26 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
rustup component add rustfmt
cargo fmt --all -- --check
clippy:
name: cargo clippy
sqlx:
name: prepared query metadata is up-to-date
runs-on: ubuntu-latest
services:
postgres:
Expand All @@ -36,7 +36,7 @@ jobs:
container:
image: rust:1.74-bookworm
env:
DATABASE_URL: postgres://postgres@postgres:5432
DATABASE_URL: postgres://postgres@postgres:5432
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
Expand All @@ -47,11 +47,33 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }}
key: ${{ runner.os }}-sqlx-prepare-${{ hashFiles('**/Cargo.lock') }}
- name: Install sqlx
run: cargo install sqlx-cli --no-default-features --features postgres
- name: Run the test sqlx migrations
run: cargo sqlx migrate run
- name: Check that the sqlx prepared query metadata is up-to-date
run: cargo sqlx prepare --workspace --check -- --all-targets --all-features

clippy:
name: cargo clippy
runs-on: ubuntu-latest
container:
image: rust:1.74-bookworm
env:
DATABASE_URL: postgres://postgres@postgres:5432
SQLX_OFFLINE: true
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }}
- run: |
rustup component add clippy
# Temporarily allowing dead-code, while denying all other warnings
Expand Down

0 comments on commit 123acf8

Please sign in to comment.