fix bugs #221
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: "Test Hazelcast CLC" | |
on: ["push", "pull_request"] | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
runs-on: ${{ matrix.os }} | |
env: | |
GOPATH: "${{ github.workspace }}" | |
HZ_VERSION: "5.3.0" | |
DEFAULT_TIMEOUT: "30s" | |
defaults: | |
run: | |
shell: "bash" | |
working-directory: "$HOME/hazelcast-commandline-client" | |
steps: | |
- name: "Checkout Code" | |
uses: "actions/checkout@v2" | |
with: | |
path: "$HOME/hazelcast-commandline-client" | |
- name: "Setup JRE" | |
uses: actions/setup-java@v2 | |
with: | |
distribution: "zulu" | |
java-version: "8" | |
- name: "Download RCD (Linux/MacOS)" | |
if: "!contains(matrix.os, 'windows')" | |
run: | | |
wget https://rcd-download.s3.us-east-2.amazonaws.com/rcd-${{ matrix.os }} | |
- name: "Start Hazelcast Remote Controller (Linux/MacOS)" | |
if: "!contains(matrix.os, 'windows')" | |
run: | | |
chmod +x rcd-${{ matrix.os }} | |
./rcd-${{ matrix.os }} -version $HZ_VERSION -dir $HOME & | |
sleep 10 | |
- name: "Download RCD (Windows)" | |
if: "contains(matrix.os, 'windows')" | |
run: | | |
curl -O https://rcd-download.s3.us-east-2.amazonaws.com/rcd-${{ matrix.os }}.exe | |
- name: "Start Hazelcast Remote Controller (Windows)" | |
if: "contains(matrix.os, 'windows')" | |
run: | | |
.\\rcd-${{ matrix.os }}.exe -version 5.3.0 & | |
sleep 10 | |
- name: "Setup Go" | |
uses: "actions/setup-go@v3" | |
with: | |
go-version: "1.19" | |
- name: "Install Go Tools" | |
run: | | |
go install golang.org/x/tools/[email protected] | |
go install honnef.co/go/tools/cmd/[email protected] | |
- name: "Go mod tidy" | |
run: | | |
go mod tidy | |
- name: "Download Test Fixtures" | |
run: | | |
curl https://rcd-download.s3.us-east-2.amazonaws.com/sample-job-1-1.0-SNAPSHOT-all.jar -o base/commands/job/testdata/sample-job-1-1.0-SNAPSHOT-all.jar | |
- name: "Run All Tests" | |
run: | | |
make test |