Skip to content

Commit

Permalink
Fix test client workflow
Browse files Browse the repository at this point in the history
Use new client command interface.
  • Loading branch information
jpraynaud committed Jun 7, 2023
1 parent fd2f194 commit ab01c7f
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions .github/workflows/test-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,13 @@ jobs:
shell: bash
working-directory: ./bin
run: |
./mithril-client ${{ steps.prepare.outputs.debug_level }} list
echo "SNAPSHOT_DIGEST=$(./mithril-client list --json | jq -r '.[0].digest')" >> $GITHUB_ENV
./mithril-client ${{ steps.prepare.outputs.debug_level }} snapshot list
echo "SNAPSHOT_DIGEST=$(./mithril-client snapshot list --json | jq -r '.[0].digest')" >> $GITHUB_ENV
- name: Download Latest Snapshot
- name: Download & restore latest snapshot
shell: bash
working-directory: ./bin
run: ./mithril-client ${{ steps.prepare.outputs.debug_level }} download $SNAPSHOT_DIGEST

- name: Restore Latest Snapshot
shell: bash
working-directory: ./bin
run: ./mithril-client ${{ steps.prepare.outputs.debug_level }} restore $SNAPSHOT_DIGEST
run: ./mithril-client ${{ steps.prepare.outputs.debug_level }} snapshot download $SNAPSHOT_DIGEST

test-docker:
strategy:
Expand Down Expand Up @@ -140,14 +135,9 @@ jobs:
- name: List and get last snapshot digest
shell: bash
run: |
${{ steps.command.outputs.mithril_client }} list
echo "SNAPSHOT_DIGEST=$(${{ steps.command.outputs.mithril_client }} list --json | jq -r '.[0].digest')" >> $GITHUB_ENV
${{ steps.command.outputs.mithril_client }} snapshot list
echo "SNAPSHOT_DIGEST=$(${{ steps.command.outputs.mithril_client }} snapshot list --json | jq -r '.[0].digest')" >> $GITHUB_ENV
- name: Download Latest Snapshot
shell: bash
run: ${{ steps.command.outputs.mithril_client }} ${{ steps.prepare.outputs.debug_level }} download $SNAPSHOT_DIGEST

# We use the `--disable-digests-cache` option because the client is not able to create the /home/appuser/.cache directory otherwise
- name: Restore Latest Snapshot
- name: Download & restore latest snapshot
shell: bash
run: ${{ steps.command.outputs.mithril_client }} ${{ steps.prepare.outputs.debug_level }} restore --disable-digests-cache $SNAPSHOT_DIGEST
run: ${{ steps.command.outputs.mithril_client }} ${{ steps.prepare.outputs.debug_level }} snapshot download $SNAPSHOT_DIGEST --download-dir /app/data

0 comments on commit ab01c7f

Please sign in to comment.