feat: update homebrew tap name #21
This file contains hidden or 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: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| go-version: ["1.21"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Cache Go modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Install Firebase CLI | |
| run: | | |
| curl -sL https://firebase.tools | bash | |
| echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| - name: Verify Firebase CLI | |
| run: | | |
| export PATH="$HOME/.local/bin:$PATH" | |
| firebase --version || echo "Firebase CLI not found in PATH" | |
| - name: Build | |
| run: go build -v ./... | |
| - name: Test | |
| run: | | |
| echo "Testing each package individually..." | |
| for pkg in $(go list ./... | grep -E "(cmd|internal)"); do | |
| echo "Testing package: $pkg" | |
| go test -short -timeout=5m "$pkg" || exit 1 | |
| done | |
| echo "All tests completed successfully" | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: "1.21" | |
| - name: Format check | |
| run: | | |
| if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then | |
| echo "The following files are not formatted:" | |
| gofmt -s -l . | |
| exit 1 | |
| fi | |
| - name: Vet | |
| run: go vet ./... | |
| npm-test: | |
| name: NPM Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "18" | |
| - name: Test npm scripts | |
| run: npm run test |