From af04534ac51effb7c0f1df6134f8d57dfd4cec0f Mon Sep 17 00:00:00 2001 From: Nicolas Chan Date: Mon, 3 May 2021 15:18:32 -0700 Subject: [PATCH] Update restic version --- .github/workflows/ci.yml | 8 +++++++- .github/workflows/docker.yml | 13 +++++++++---- test/test.sh | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f08015b..992972d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,13 @@ jobs: submodules: 'recursive' - name: Install kcov and shellcheck - run: sudo apt-get install -y kcov shellcheck restic + run: sudo apt-get install -y kcov shellcheck + + - name: Install restic + run: | + wget https://github.com/restic/restic/releases/download/v0.12.0/restic_0.12.0_linux_amd64.bz2 + bzip2 -d restic_0.12.0_linux_amd64.bz2 + sudo cp restic_0.12.0_linux_amd64 /usr/local/bin/restic - name: Run tests run: test/test.sh diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 9a21bf0..7794cbe 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,12 +1,11 @@ # This is a basic workflow to help you get started with Actions -name: Docker +name: CI # Controls when the action will run. on: push: - branches: - - master + pull_request: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -24,7 +23,13 @@ jobs: submodules: 'recursive' - name: Install kcov and shellcheck - run: sudo apt-get install -y kcov shellcheck restic + run: sudo apt-get install -y kcov shellcheck + + - name: Install restic + run: | + wget https://github.com/restic/restic/releases/download/v0.12.0/restic_0.12.0_linux_amd64.bz2 + bzip2 -d restic_0.12.0_linux_amd64.bz2 + sudo cp restic_0.12.0_linux_amd64 /usr/local/bin/restic - name: Run tests run: test/test.sh diff --git a/test/test.sh b/test/test.sh index 070d52f..9f13e4e 100755 --- a/test/test.sh +++ b/test/test.sh @@ -85,7 +85,7 @@ test-restic-incomplete-snapshot () { TIMESTAMP="$(date +%F_%H-%M-%S --date="2021-01-01")" OUTPUT="$(./backup.sh -i "$TEST_TMP/server/world" -r "$TEST_TMP/backups-restic" -s "$SCREEN_TMP" -f "$TIMESTAMP")" assertEquals 1 "$(restic list snapshots -r "$TEST_TMP/backups-restic" | wc -l)" - # assertContains "$OUTPUT" "Incomplete snapshot taken" + assertContains "$OUTPUT" "Incomplete snapshot taken" } test-restic-no-snapshot () {