Skip to content

Commit

Permalink
tests: Test both fast memory and slower disk mounted filesystem
Browse files Browse the repository at this point in the history
  • Loading branch information
serathius committed Apr 11, 2022
1 parent dd08e15 commit 9ff5760
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/functional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ jobs:
fail-fast: true
matrix:
target:
- linux-amd64-functional
- linux-amd64-functional-ramfs
- linux-amd64-functional-ext4
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
Expand All @@ -19,8 +20,23 @@ jobs:
run: |
echo "${TARGET}"
case "${TARGET}" in
linux-amd64-functional)
GO_BUILD_FLAGS='-v -mod=readonly' ./scripts/build.sh && GOARCH=amd64 PASSES='functional' ./scripts/test.sh
linux-amd64-functional-ramfs)
GO_BUILD_FLAGS='-v -mod=readonly' ./scripts/build.sh
TESTDIR=${PWD}/ramfs
mkdir ${TESTDIR}
sudo mount -t ramfs -o size=2048m none ${TESTDIR}
sudo chmod 777 ${TESTDIR}
TMPDIR=${TESTDIR} GOARCH=amd64 PASSES='functional' ./scripts/test.sh
;;
linux-amd64-functional-ext4)
GO_BUILD_FLAGS='-v -mod=readonly' ./scripts/build.sh
TESTDIR=${PWD}/ext4
dd if=/dev/zero of=ext4.img bs=1M count=2048
mkfs.ext4 ext4.img
mkdir ${TESTDIR}
sudo mount -t ext4 -o loop ext4.img ${TESTDIR}
sudo chmod 777 ${TESTDIR}
TMPDIR=${TESTDIR} GOARCH=amd64 PASSES='functional' ./scripts/test.sh
;;
*)
echo "Failed to find target"
Expand Down

0 comments on commit 9ff5760

Please sign in to comment.