Skip to content

Commit

Permalink
fix(ci): github action runner disk full error #641
Browse files Browse the repository at this point in the history
Added a docker resource pruning call to the
test case that was triggering the disk full issue
while pulling the Fabric AIO image necessary
for it's operation.

It is expected that this error will crop up in the future with different test cases and if and when that
happens we can add more of the same to
those tests as well, but for now, I did not want to
make this change to every single test case since
it wasn't strictly necessary and a better solution may
come along in the near future as well.

Fixes #641

Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
  • Loading branch information
petermetz committed Mar 11, 2021
1 parent d075168 commit 193fe52
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import { v4 as uuidv4 } from "uuid";
import bodyParser from "body-parser";
import express from "express";

import { FabricTestLedgerV1 } from "@hyperledger/cactus-test-tooling";
import {
Containers,
FabricTestLedgerV1,
} from "@hyperledger/cactus-test-tooling";
import { PluginRegistry } from "@hyperledger/cactus-core";

import {
Expand Down Expand Up @@ -37,6 +40,16 @@ import { DiscoveryOptions } from "fabric-network";
*/

test("runs tx on a Fabric v2.2.0 ledger", async (t: Test) => {
// Always set to true when GitHub Actions is running the workflow.
// You can use this variable to differentiate when tests are being run locally or by GitHub Actions.
// @see https://docs.github.com/en/actions/reference/environment-variables
if (process.env.GITHUB_ACTIONS === "true") {
// Github Actions started to run out of disk space recently so we have this
// hack here to attempt to free up disk space when running inside a VM of
// the CI system.
await Containers.pruneDockerResources();
}

const logLevel: LogLevelDesc = "TRACE";

const ledger = new FabricTestLedgerV1({
Expand Down

0 comments on commit 193fe52

Please sign in to comment.