Skip to content

Commit

Permalink
Try add a beta workflow
Browse files Browse the repository at this point in the history
This isn't very nice to be honest.
  • Loading branch information
flub committed Dec 16, 2024
1 parent 860e16d commit 57798f8
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/beta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Run tests using the beta Rust compiler

name: Beta Rust

on:
workflow_call:
inputs:
tests:
description: "Reusable workflow of the tests to be executed using the beta compiler"
type: string
required: true

env:
IROH_FORCE_STAGING_RELAYS: "1"

jobs:
tests:
uses: "${{ inputs.tests }}"
with:
rust-version: beta
notify:
needs: tests
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Extract test results
run: |
printf '${{ toJSON(needs) }}\n'
result=$(echo '${{ toJSON(needs) }}' | jq -r .tests.result)
echo TESTS_RESULT=$result
echo "TESTS_RESULT=$result" >>"$GITHUB_ENV"
- name: Notify discord on failure
uses: n0-computer/discord-webhook-notify@v1
if: ${{ env.TESTS_RESULT == 'failure' }}
with:
text: "Beta Rust in **${{ github.repository }}**:"
severity: error
details: |
Rustc beta tests failed
See https://github.com/${{ github.repository }}/actions/worklows/${{ github.workflow }}
webhookUrl: ${{ secrets.DISCORD_N0_GITHUB_CHANNEL_WEBHOOK_URL }}

0 comments on commit 57798f8

Please sign in to comment.