Skip to content

Commit

Permalink
Update rust.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mekaem committed Nov 2, 2024
1 parent 4b2b0d7 commit 97e00f5
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,39 @@ on:
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always
permissions:
contents: read

jobs:
build:

name: Build and test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Restore cache
uses: Swatinem/rust-cache@v2

- name: Build
run: cargo build --verbose

- name: Run tests
run: cargo test --verbose

- name: Send Discord Notification
if: always()
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ env.DISCORD_WEBHOOK }}
status: ${{ job.status }}
title: "Rust Build Status"
description: |
Repository: ${{ github.repository }}
Branch: ${{ github.ref_name }}
Event: ${{ github.event_name }}

0 comments on commit 97e00f5

Please sign in to comment.