updated Makefile and workflow

pull/12064/head
Yajith Dayarathna 2024-08-09 21:49:37 +12:00
parent 70b3daf6e2
commit 82a41e4198
No known key found for this signature in database
GPG Key ID: 7F90D690ED665EF0
2 changed files with 16 additions and 17 deletions

View File

@ -49,26 +49,21 @@ jobs:
if: github.event.pull_request.draft == false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- name: 'checkout the current branch'
uses: actions/checkout@v4.1.1
with:
ref: ${{ github.event.inputs.branch }}
- name: 'set up golang'
uses: actions/setup-go@v5.0.0
with:
go-version: ${{ env.GO_VERSION }}
- name: Install docker-compose
run: |
sudo tee "/usr/local/bin/docker-compose" > /dev/null <<EOF
#!/bin/bash
- name: 'install dependencies'
run: make test-deps PLATFORM=${{ matrix.config.platform }} ARCH=${{ matrix.config.arch }}
# Check if the user has provided any arguments
if [ "$#" -eq 0 ]; then
echo "Usage: docker-compose [OPTIONS] COMMAND [ARGS...]"
exit 1
fi
- name: 'update $PATH'
run: echo "$(pwd)/dist" >> $GITHUB_PATH
# Forward the arguments to 'docker compose'
docker compose "$@"
EOF
sudo chmod +x /usr/local/bin/docker-compose
- name: Run tests
- name: 'run tests'
run: make test-server

View File

@ -64,6 +64,10 @@ clean: ## Remove all build and download artifacts
.PHONY: test test-client test-server
test: test-server test-client ## Run all tests
test-deps: init-dist
dockerComposeVersion=$(shell jq -r '.dockerCompose' < "./binary-version.json")
./build/download_docker_compose_binary.sh $(PLATFORM) $(ARCH) $(dockerComposeVersion)
test-client: ## Run client tests
yarn test $(ARGS)