Skip to content

Commit c024f10

Browse files
committed
improving test.yml
1 parent c377a44 commit c024f10

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.github/workflows/test.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,19 @@ jobs:
2727
- name: Install htmltest
2828
run: |
2929
# Fetch the latest version of htmltest
30-
# Fetch the latest version of htmltest, a tool for testing HTML output
31-
# It ensures that the generated site does not contain broken links or other HTML issues
3230
LATEST_VERSION=$(curl -s https://api.github.com/repos/wjdp/htmltest/releases/latest | grep "tag_name" | cut -d '"' -f 4)
31+
echo "LATEST_VERSION=${LATEST_VERSION}"
3332
34-
# Download the htmltest binary for the latest version
35-
wget -q https://github.com/wjdp/htmltest/releases/download/${LATEST_VERSION}/htmltest_${LATEST_VERSION}_linux_amd64.tar.gz || { echo "Error: Failed to download htmltest"; exit 1; }
36-
mv htmltest "$CACHE_DIR/htmltest_${LATEST_VERSION}"
33+
if [ -z "$LATEST_VERSION" ]; then
34+
echo "Failed to fetch the latest version of htmltest."
35+
exit 1
3736
fi
38-
sudo cp "$CACHE_DIR/htmltest_${LATEST_VERSION}" /usr/local/bin/htmltest
39-
mv htmltest $HOME/bin/
40-
echo "$HOME/bin" >> $GITHUB_PATH
37+
38+
echo "Downloading from: https://github.com/wjdp/htmltest/releases/download/${LATEST_VERSION}/htmltest_${LATEST_VERSION}_linux_amd64.tar.gz"
39+
wget -q https://github.com/wjdp/htmltest/releases/download/${LATEST_VERSION}/htmltest_${LATEST_VERSION}_linux_amd64.tar.gz
40+
41+
tar xzf htmltest_${LATEST_VERSION}_linux_amd64.tar.gz
42+
sudo mv htmltest /usr/local/bin/
4143
4244
- name: Build and test
4345
run: |

0 commit comments

Comments
 (0)