Skip to content

Fix CI - Attempt 4

Fix CI - Attempt 4 #45

Workflow file for this run

on: push
env:
CARGO_TERM_COLOR: always
jobs:
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Rust Cache
uses: swatinem/rust-cache@v2
- name: Install sqlx-cli
run: cargo install sqlx-cli
- name: Prepare Sqlx Database
run: DATABASE_URL=sqlite://${GITHUB_WORKSPACE}/target/sqlx-check.db?mode=rwc cargo sqlx migrate run
shell: bash
- name: Cargo Clippy
run: |
cargo clippy --all-features --all-targets --message-format=json-diagnostic-rendered-ansi | jq -r 'select(.reason == "compiler-message") | .message as $message | $message.spans[] | select(.is_primary == true) | "::" + $message.level + " file=" + .file_name + ",line=" + (.line_start | tostring) + ",endLine=" + (.line_end | tostring) + ",title=" + $message.message + "::" + $message.rendered'
exit ${PIPESTATUS[0]}
format:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cargo Format
run: cargo fmt --check
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Rust Cache
uses: swatinem/rust-cache@v2
- name: Install sqlx-cli
run: cargo install sqlx-cli
- name: Prepare Sqlx Database
run: DATABASE_URL=sqlite://${GITHUB_WORKSPACE}/target/sqlx-check.db?mode=rwc cargo sqlx migrate run
shell: bash
- name: Cargo Build
run: |
RUSTFLAGS=-Awarnings cargo build --message-format=json-diagnostic-rendered-ansi | jq -r 'select(.reason == "compiler-message") | .message as $message | $message.spans[] | select(.is_primary == true) | "::" + $message.level + " file=" + .file_name + ",line=" + (.line_start | tostring) + ",endLine=" + (.line_end | tostring) + ",title=" + $message.message + "::" + $message.rendered'
exit ${PIPESTATUS[0]}