-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
On push trigger for now to test it. Can be trigger manually to test that the mithril-client can list, download and restore on each supported environment.
- Loading branch information
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Mithril Client multi-platform test | ||
|
||
#on: workflow_dispatch | ||
on: push | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# os: [ ubuntu-22.04, macos-12, windows-latest ] | ||
os: [ ubuntu-22.04 ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
with: | ||
path: sources/ | ||
|
||
- name: Prepare environment variables | ||
id: prepare | ||
run: | | ||
echo "sha=$(git ls-remote {{ github.repositoryUrl }} refs/heads/main | cut -f 1)" >> $GITHUB_OUTPUT | ||
echo "NETWORK=preview" >> $GITHUB_ENV | ||
echo "AGGREGATOR_ENDPOINT=https://aggregator.pre-release-preview.api.mithril.network/aggregator" >> $GITHUB_ENV | ||
echo "GENESIS_VERIFICATION_KEY=$(wget -q -O - https://raw.githubusercontent.com/input-output-hk/mithril/main/TEST_ONLY_genesis.vkey)" >> $GITHUB_ENV | ||
- name: Checkout binary | ||
uses: dawidd6/action-download-artifact@v2 | ||
with: | ||
name: mithril-distribution-Linux-X64 | ||
path: ./ | ||
commit: ${{ steps.prepare.outputs.sha }} | ||
workflow: ci.yml | ||
workflow_conclusion: success | ||
|
||
- name: Set permissions | ||
run: | | ||
chmod +x ./mithril-client | ||
ls -l | ||
- name: List and get last snapshot digest | ||
run: | | ||
./mithril-client list | ||
echo "SNAPSHOT_DIGEST=$(./mithril-client list --json | jq -r ".[0].digest)" >> $GITHUB_ENV | ||
- name: Download Latest Snapshot | ||
run: ./mithril-client download $SNAPSHOT_DIGEST | ||
|
||
- name: Restore Latest Snashot | ||
run: ./mithril-client restore $SNAPSHOT_DIGEST |