Skip to content

Commit

Permalink
test: test go1.23 works
Browse files Browse the repository at this point in the history
  • Loading branch information
AsterDY committed Aug 11, 2024
1 parent 9c40238 commit ab2615c
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/develop-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Go Latest Linux-X64

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 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: ./go_latest.sh go1.23
continue-on-error: true

- name: update kitex
run: ./update_kitext.sh 0bc4a44e9521a73914965c8c3b236e100edd1a95

- name: run tests
runt: |
find . -name test.sh -print0 | while IFS= read -r -d '' script; do
script_dir=$(dirname "$script")
chmod +x "$script"
(cd "$script_dir" && bash "./$(basename "$script")")
done
9 changes: 9 additions & 0 deletions go_latest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

TAG=$1

git clone -b release-branch.$TAG https://github.com/golang/go.git $TAG

cd $TAG/src

./all.bash
15 changes: 15 additions & 0 deletions update_kitex.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

version=$1

# find go.mod and update dependencies
find . -name go.mod -print0 | while IFS= read -r -d '' script; do
# get absolute dir path
pwd=$(pwd)
script_dir=$(dirname "$script")
cd "$script_dir"
go get -v "github.com/cloudwego/kitex@$version"
go mod tidy
cd "$pwd"
done

0 comments on commit ab2615c

Please sign in to comment.