Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/actions/setup-kat/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Setup Kat
description: >
Prepare kat tool for use in CI

runs:
using: composite
steps:
- name: Install AWS CLI
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y awscli
- name: Set up kat
shell: bash
run: |
kat_version=$(aws s3 ls s3://kotlin-sdk-build-tools/kat-releases/ | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1)

if [ -z "$kat_version" ]; then
echo "No versions of kat were found"
exit 1
fi
echo "Downloading kat version $kat_version"

aws s3 cp s3://kotlin-sdk-build-tools/kat-releases/$kat_version/kat-$kat_version.zip ./kat.zip

echo "Unzipping kat tool"
unzip -qq ./kat.zip -d kat

kat_binary_path="$PWD/kat/kat-$kat_version/bin"
export PATH="$kat_binary_path:$PATH"
echo "$kat_binary_path" >> $GITHUB_PATH

echo "Installed kat version $(kat version)" || (echo "Failed to execute kat command" && exit 1)
Loading