Skip to content

Merge pull request #6812 from elsirion/2025-02-ln-diagrams #90

Merge pull request #6812 from elsirion/2025-02-ln-diagrams

Merge pull request #6812 from elsirion/2025-02-ln-diagrams #90

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: "Upgrade Tests"
env:
PERFIT_SERVER: https://perfit.dev.fedimint.org
# Controls when the workflow will run
on:
schedule:
# run daily during low usage hours
- cron: '30 4 * * *'
push:
branches: [ "main", "master", "devel", "releases/v*" ]
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
pull_request:
branches: [ "main", "master", "devel", "releases/v*" ]
merge_group:
branches: [ "main", "master", "devel", "releases/v*" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
versions:
description: 'Versions to test (if empty, uses same as daily run)'
required: false
default: ''
test_kinds:
description: 'Comma-separated tests to run. Options: fedimintd,fedimint-cli,gateway'
required: false
default: ''
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
tests:
if: github.repository == 'fedimint/fedimint'
name: "Upgrade tests"
runs-on: [self-hosted, linux]
timeout-minutes: 120
steps:
- uses: actions/checkout@v4
- name: Prepare
uses: ./.github/actions/prepare
- uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-23.11
extra_nix_config: |
connect-timeout = 15
stalled-download-timeout = 15
- uses: cachix/cachix-action@v15
with:
name: fedimint
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
continue-on-error: true
- name: Upgrade tests
run: |
# read versions from manually triggered workflows
# default needed for cron or manual workflow without params
VERSIONS="${{ github.event.inputs.versions }}"
VERSIONS=${VERSIONS:="v0.3.4-rc.1 current, v0.4.4 current, v0.5.0 current"}
# if empty, defaults to all test kinds within script
export TEST_KINDS="${{ github.event.inputs.test_kinds }}"
export FM_DEVIMINT_DISABLE_MODULE_LNV2=1
export FM_TEST_CI_ALL_JOBS
export FM_TEST_UPGRADE_TIMEOUT
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
# the GH runners become flaky with manual runs during the release
# process, so we reduce parallelism for manual release testing
FM_TEST_CI_ALL_JOBS="5"
# some upgrade paths can take a long time, so we increase the timeout
FM_TEST_UPGRADE_TIMEOUT="3600"
else
unset FM_TEST_CI_ALL_JOBS
unset FM_TEST_UPGRADE_TIMEOUT
fi
# the default tmp dir is too long (/home/ubuntu/actions-runner/_work/_temp/)
# we need to use `nix develop -c` to be able to use `nix build` inside of backwards-compatibility-test
# Disable `sccache`, it seems incompatible with self-hosted runner sandbox for some reason, and
# it doesn't benefit us much here anyway.
env \
TMPDIR=/tmp \
CARGO_PROFILE=ci \
PERFIT_ACCESS_TOKEN="${{ secrets.PERFIT_ACCESS_TOKEN }}" \
nix develop -c \
nix run 'github:rustshop/perfit?rev=a2ea3bae86b0e70d2ebdbca1fd16a843b7f0a3bd#perfit' -- \
run \
--metric 5pReH96mSsqIeh513jJQGg \
--metadata "commit=${LAST_COMMIT_SHA}" \
-- \
env -u RUSTC_WRAPPER \
scripts/tests/run-with-nix-workspace-ci.sh ./scripts/tests/upgrade-test.sh "$VERSIONS"
notifications:
if: always() && github.repository == 'fedimint/fedimint'
name: "Notifications"
timeout-minutes: 1
runs-on: [self-hosted, linux]
needs: [ tests ]
steps:
- name: Discord notifications on failure
# https://stackoverflow.com/a/74562058/134409
if: ${{ always() && contains(needs.*.result, 'failure') }}
# https://github.com/marketplace/actions/actions-status-discord
uses: sarisia/actions-status-discord@v1
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
# current job is a success, but that's not what we're interested in
status: failure