Skip to content

Commit

Permalink
[TASK] Add testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ochorocho committed Jul 7, 2024
1 parent a6161c5 commit a58e320
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ jobs:
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64
-
name: Install yq
run: |
sudo snap install yq
-
name: Setup BATS
uses: mig4/setup-bats@v1
Expand All @@ -47,5 +43,6 @@ jobs:
name: "Test ddev ${{ matrix.version }} image"
shell: 'script -q -e -c "bash {0}"'
run: |
sudo snap install yq
./build.sh -v ${{ matrix.version }} -l
DDEV_VERSION=${{ matrix.version }} bash bats tests
4 changes: 4 additions & 0 deletions tests/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
version=$(echo "$output" | yq .Client.Version)
regex='^([0-9]+)\.([0-9]+)\.([0-9]+)$'

echo $version

[[ $version =~ $regex ]]
[ "$status" -eq 0 ]
}
Expand All @@ -20,6 +22,8 @@
version=$(echo "$output" | head -2 | tail -1 | yq '.raw.["DDEV version"]')
regex='^v([0-9]+)\.([0-9]+)\.([0-9]+)$'

echo $version

[[ $version =~ $regex ]]
[ "$status" -eq 0 ]
}
Expand Down

0 comments on commit a58e320

Please sign in to comment.