Skip to content

Update marlowe-benchmark command in nightly.yml #5111

Update marlowe-benchmark command in nightly.yml

Update marlowe-benchmark command in nightly.yml #5111

Workflow file for this run

name: "Tests"
env:
CACHE_NAME: marlowe-temp
ALLOWED_URIS: "https://github.com https://api.github.com"
TRUSTED_PUBLIC_KEYS: "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= marlowe-temp.cachix.org-1:1gPjVFpu4QjaAT3tRurCioX+BC23V7mjvFwpP5bV0Ec="
SUBSTITUTERS: "https://cache.nixos.org/ https://cache.iog.io https://marlowe-temp.cachix.org"
on:
pull_request:
branches:
- main
workflow_call:
jobs:
integration:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_HOST_AUTH_METHOD: trust
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v26
with:
nix_path: nixpkgs=channel:nixos-unstable
install_url: https://releases.nixos.org/nix/nix-2.20.3/install
extra_nix_config: |
allowed-uris = ${{ env.ALLOWED_URIS }}
trusted-public-keys = ${{ env.TRUSTED_PUBLIC_KEYS }}
substituters = ${{ env.SUBSTITUTERS }}
experimental-features = nix-command flakes
- name: Setup Cachix
uses: cachix/cachix-action@v14
with:
name: ${{ env.CACHE_NAME }}
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- name: Evaluate test derivation
run: |
nix build --dry-run --json .#integration-tests > test-store-path.json
- name: Cache test results
id: cache-results
uses: actions/cache@v4
with:
# Use run_attempt in the cache key so that explicitly re-running the
# tests will force the test to run again.
key: ${{ runner.os }}-integration-tests-${{ hashFiles('test-store-path.json') }}-${{ github.run_attempt }}
path: |
~/integration-tests.log
~/integration-tests.status
- if: ${{ steps.cache-results.outputs.cache-hit != 'true' }}
name: Build tests
run: nix build .#integration-tests --show-trace
- if: ${{ steps.cache-results.outputs.cache-hit != 'true' }}
name: Run tests
run: |
set -o pipefail
result/bin/marlowe-integration-tests --strict | tee ~/integration-tests.log
echo $? > ~/integration-tests.status
exit $(cat ~/integration-tests.status)
env:
MARLOWE_RT_TEST_DB_HOST: localhost
MARLOWE_RT_TEST_CLEANUP_DATABASE: "False"
MARLOWE_RT_TEST_SUBMIT_CONFIRMATION_BLOCKS: 0
- if: ${{ failure() && steps.cache-results.outputs.cache-hit != 'true' }}
name: Upload failed test directories as artifacts
uses: actions/upload-artifact@v4
with:
name: workspaces
path: |
/tmp/workspaces
!/tmp/workspaces/**/*.socket
- if: ${{ steps.cache-results.outputs.cache-hit == 'true' }}
name: Display test results
run: |
echo "Test log:"
cat ~/integration-tests.log
exit $(cat ~/integration-tests.status)