name: tests
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
jobs:
tests:
runs-on: ubuntu-latest
outputs:
outcome: ${{ steps.tests.outcome }}
steps:
- uses: actions/checkout@v4
- name: tests
id: tests
run: cargo test --verbose
badge:
runs-on: ubuntu-latest
needs: tests
if: always() && github.event_name == 'push'
steps:
- name: passing
if: needs.tests.outputs.outcome == 'success'
uses: SimplePixelFont/badge-spf-action@main
with:
filename: tests.png
label: Tests
message: passing
labelColor: "#2d3136"
color: "#00bfa3"
logo: "https://raw.githubusercontent.com/The-Nice-One/GalleryArt/refs/heads/main/emojis_flattened/wrench.png"
font: "https://raw.githubusercontent.com/SimplePixelFont/web-spf/refs/heads/main/Monogram5x8-light.spf"
- name: failing
if: needs.tests.outputs.outcome == 'failure'
uses: SimplePixelFont/badge-spf-action@main
with:
filename: tests.png
label: Tests
message: failing
labelColor: "#2d3136"
color: "#d94a69"
logo: "https://raw.githubusercontent.com/The-Nice-One/GalleryArt/refs/heads/main/emojis_flattened/wrench.png"
font: "https://raw.githubusercontent.com/SimplePixelFont/web-spf/refs/heads/main/Monogram5x8-light.spf"
- name: deploy
uses: exuanbo/actions-deploy-gist@v1
with:
token: ${{ secrets.GIST_SECRET }}
gist_id: cfebb0fe555ac7e77ada109c469cdeb4
file_path: tests.png
file_type: binary