2019-10-02 05:41:14 -07:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
2019-10-02 06:23:17 -07:00
|
|
|
echo "Starting AdGuard Home CI script"
|
|
|
|
|
|
|
|
# Print the current directory contents
|
|
|
|
ls -la
|
|
|
|
|
2019-10-02 05:41:14 -07:00
|
|
|
# Check versions and current directory
|
|
|
|
node -v
|
|
|
|
npm -v
|
|
|
|
go version
|
|
|
|
golangci-lint --version
|
|
|
|
|
|
|
|
# Run linter
|
|
|
|
golangci-lint run
|
|
|
|
|
|
|
|
# Run tests
|
|
|
|
go test -race -v -bench=. -coverprofile=coverage.txt -covermode=atomic ./...
|
|
|
|
|
|
|
|
# Make
|
|
|
|
make clean
|
|
|
|
make build/static/index.html
|
|
|
|
make
|
|
|
|
|
2019-10-08 02:13:37 -07:00
|
|
|
# if [[ -z "$(git status --porcelain)" ]]; then
|
|
|
|
# # Working directory clean
|
|
|
|
# echo "Git status is clean"
|
|
|
|
# else
|
|
|
|
# echo "Git status is not clean and contains uncommited changes"
|
|
|
|
# echo "Please make sure there are no changes"
|
|
|
|
# exit 1
|
|
|
|
# fi
|
2019-10-02 06:23:17 -07:00
|
|
|
|
|
|
|
echo "AdGuard Home CI script finished successfully"
|