nightly #99
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Nightly sanity checks on `main` | |
# On failure, opens an issue or updates existing if any | |
name: nightly | |
on: | |
workflow_dispatch: | |
# Once per day at 00:00 UTC | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
mac-m1: | |
runs-on: macos-latest-xlarge | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: taiki-e/install-action@nextest | |
- uses: Swatinem/rust-cache@v2 | |
- name: Linux Tests | |
id: tests | |
run: | | |
cargo nextest run --profile ci --workspace --cargo-profile dev-ci | |
continue-on-error: true | |
# Non-gadget replica for testing | |
- name: Linux Gadget Tests w/o debug assertions | |
id: gadget-tests | |
run: | | |
cargo nextest run --profile ci --workspace --cargo-profile dev-ci | |
continue-on-error: true | |
- name: Gather status in a single variable | |
if: steps.tests.outcome == 'success' && steps.gadget-tests.outcome == 'success' | |
run: echo "status=true" | tee -a $GITHUB_ENV | |
- name: Set env & debug | |
run: | | |
echo "GIT_COMMIT=$(git rev-parse --short HEAD)" | tee -a $GITHUB_ENV | |
echo "GIT_COMMIT_DATE=$(git log -1 --format=%cd --date=format:%Y-%m-%d)" | tee -a $GITHUB_ENV | |
echo "WORKFLOW_URL=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" | tee -a $GITHUB_ENV | |
echo ${{ steps.tests.outcome }} | |
echo ${{ steps.gadget-tests.outcome }} | |
echo ${{ env.status }} | |
- uses: JasonEtco/create-an-issue@v2 | |
if: env.status != 'true' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GIT_COMMIT: ${{ env.GIT_COMMIT }} | |
GIT_COMMIT_DATE: ${{ env.GIT_COMMIT_DATE }} | |
WORKFLOW_URL: ${{ env.WORKFLOW_URL }} | |
with: | |
filename: .github/NIGHTLY_FAILURE.md | |
update_existing: true |