mirror of https://github.com/portainer/portainer
updated Makefile and workflow
parent
70b3daf6e2
commit
82a41e4198
|
@ -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
|
||||
|
|
4
Makefile
4
Makefile
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue