chore(toolchain): Enhance code style in toolchain #109
Workflow file for this run
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: "go-client-ci" | |
on: | |
push: | |
branches: | |
- master | |
- /^release-.*$/ | |
paths: | |
- hugegraph-client-go/** | |
- hugegraph-dist/** | |
- .github/workflows/** | |
- pom.xml | |
pull_request: | |
paths: | |
- hugegraph-client-go/** | |
- hugegraph-dist/** | |
- .github/workflows/** | |
- pom.xml | |
jobs: | |
client-go-ci: | |
runs-on: ubuntu-latest | |
env: | |
USE_STAGE: 'true' # Whether to include the stage repository. | |
TRAVIS_DIR: hugegraph-client/assembly/travis | |
# TODO: replace it with the (latest - n) commit id (n >= 15) | |
COMMIT_ID: b52517c | |
strategy: | |
fail-fast: false | |
matrix: | |
JAVA_VERSION: ['11'] | |
steps: | |
- name: Install JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.JAVA_VERSION }} | |
distribution: 'zulu' | |
- name: Cache Maven packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Use staged maven repo | |
if: ${{ env.USE_STAGE == 'true' }} | |
run: | | |
cp $HOME/.m2/settings.xml /tmp/settings.xml | |
mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml | |
- name: Prepare env and service | |
run: | | |
$TRAVIS_DIR/install-hugegraph-from-source.sh $COMMIT_ID | |
- name: Init Go env | |
uses: actions/setup-go@v2.1.3 | |
with: { go-version: '1.x' } | |
- name: Go test | |
run: | | |
go version | |
sudo swapoff -a | |
sudo sysctl -w vm.swappiness=1 | |
sudo sysctl -w fs.file-max=262144 | |
sudo sysctl -w vm.max_map_count=262144 | |
cd hugegraph-client-go && make test |