Skip to content

Create rust.yml

Create rust.yml #2

Workflow file for this run

name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check
run: |
cargo check --message-format json | jq -r '
select(.message.level and (.message.spans | length > 0))
| {level: (.message.level | sub("note"; "notice")), message: .message.message} as $ctx
| .message.spans[]
| "::\($ctx.level),line=\(.line_start),col=\(.column_start),endLine=\(.line_end),columnEnd=\(.column_end),title=rust check::\($ctx.message)"'