fix: set flag name in resolve debugger link (#70) #185
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: CI | |
on: | |
pull_request: | |
branches: | |
- 'main' | |
push: | |
branches: | |
- 'main' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go-version: ['1.19', '1.20', '1.21', '1.22', '1.23'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Build Confidence | |
run: cd pkg/confidence && go build -v . | |
- name: Build Provider | |
run: cd pkg/provider && go build -v . | |
- name: Test Confidence | |
run: cd pkg/confidence && go test -v | |
- name: Test Provider | |
run: cd pkg/provider && go test -v | |
- name: Run gofmt | |
run: | | |
modules=("pkg/confidence" "pkg/provider" "demo" "demo-open-feature") | |
fmt_issues="" | |
for module in "${modules[@]}"; do | |
fmt_output=$(gofmt -l "$module") | |
if [ -n "$fmt_output" ]; then | |
fmt_issues+="$fmt_output"$'\n' | |
fi | |
done | |
if [ -n "$fmt_issues" ]; then | |
echo "The following files are not properly formatted:" | |
echo "$fmt_issues" | |
echo "Please run 'gofmt -w .' in the respective module directories to format your code." | |
exit 1 | |
fi |