Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 40 additions & 2 deletions .github/workflows/scheduled_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,54 @@ on:
workflow_dispatch:

jobs:
get-latest-release:
name: Get latest release tag
runs-on: ubuntu-latest
outputs:
latest-tag: ${{ steps.get-tag.outputs.tag }}
steps:
- name: Get latest release tag
id: get-tag
run: |
TAG=$(gh release list --repo ${{ github.repository }} --limit 1 --json tagName -q '.[0].tagName')
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

test:
name: Tests (latest)
name: Tests (${{ matrix.ref }}, Scarb ${{ matrix.scarb-version }})
needs: get-latest-release
runs-on: ubuntu-latest
strategy:
matrix:
ref:
- main
- ${{ needs.get-latest-release.outputs.latest-tag }}
scarb-version: [latest, nightly]
steps:
- uses: actions/checkout@v6
with:
ref: ${{ matrix.ref }}
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
- uses: hrishikesh-kadam/setup-lcov@6c1aa0cc9e1c02f9f58f01ac599f1064ccc83470 # v1.1.0
- uses: software-mansion/setup-scarb@2a96b748888e3329ee44ac9ac073d930e692b3cd # v1.5.1
with:
scarb-version: latest
scarb-version: ${{ matrix.scarb-version }}
- uses: foundry-rs/setup-snfoundry@16e23ddd0e2845f38727c92f4b913a7b728cda9e # v6.0.0
- run: cargo test --release --features allows-excluding-macros

notify_failed:
runs-on: ubuntu-latest
if: always() && failure()
needs: [test]
steps:
- name: Notifying about check fail!
uses: slackapi/slack-github-action@v3.0.3
with:
webhook: ${{ secrets.SLACK_SCHEDULED_CHECK_FAILURE_WEBHOOK_URL }}
webhook-type: webhook-trigger
payload: |
{
"url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
Loading