update #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: kitex version tests | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clear repository | |
run: sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE | |
- uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Install Docker Compose | |
run: | | |
sudo curl -L "https://github.com/docker/compose/releases/download/$(curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r .tag_name)/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
docker-compose --version | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.22.4 | |
- uses: actions/cache@v2 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: build go image | |
run: | | |
sh ./go_latest.sh go1.23 | |
continue-on-error: true | |
- name: update specific version kitex | |
run: | | |
PWD=$(pwd) | |
export GOROOT=$PWD/go1.23 | |
export PATH=$GOROOT/bin:$PATH | |
go version | |
./update_kitex.sh 0bc4a44e9521a73914965c8c3b236e100edd1a95 ./go1.23 | |
- name: Run test.sh | |
run: | | |
PWD=$(pwd) | |
export GOROOT=$PWD/go1.23 | |
export PATH=$GOROOT/bin:$PATH | |
go version | |
find . -name test.sh -print0 | while IFS= read -r -d '' script; do | |
script_dir=$(dirname "$script") | |
if [ "$script_dir" == "go1.23" ]; then | |
continue | |
fi | |
chmod +x "$script" | |
(cd "$script_dir" && bash "./$(basename "$script")") | |
done |