Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI improvements and cleanup #111

Merged
merged 3 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
hopeyen marked this conversation as resolved.
Show resolved Hide resolved

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